trc: fix $ifs bug introduced with utf-8 code - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 6886b3cd89134e1e259d66940943d15d29b159ac
DIR parent 425a2b7863f6e9f5c70e28f68d3077afb5b57c77
HTML 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:
M src/cmd/rc/havefork.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
DIR diff --git a/src/cmd/rc/havefork.c b/src/cmd/rc/havefork.c
t@@ -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){