commit 6886b3cd89134e1e259d66940943d15d29b159ac
parent 425a2b7863f6e9f5c70e28f68d3077afb5b57c77
Author: Russ Cox <rsc@swtch.com>
Date: Wed, 16 Feb 2011 12:48:06 -0500
rc: fix $ifs bug introduced with utf-8 code
R=rsc
http://codereview.appspot.com/4187050
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/cmd/rc/havefork.c b/src/cmd/rc/havefork.c
@@ -156,8 +156,10 @@ Xbackq(void)
continue;
}
stop:
- *s = '\0';
- v = newword(wd, v);
+ if(s != wd) {
+ *s = '\0';
+ v = newword(wd, v);
+ }
s = wd;
}
if(s!=wd){