diff options
author | Russ Cox <rsc@swtch.com> | 2011-02-16 12:48:06 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2011-02-16 12:48:06 -0500 |
commit | 6886b3cd89134e1e259d66940943d15d29b159ac (patch) | |
tree | 710f324f1f1c94cd89f119025f0cce90f7cfc2e9 /src/cmd/rc | |
parent | 425a2b7863f6e9f5c70e28f68d3077afb5b57c77 (diff) | |
download | plan9port-6886b3cd89134e1e259d66940943d15d29b159ac.tar.gz plan9port-6886b3cd89134e1e259d66940943d15d29b159ac.tar.bz2 plan9port-6886b3cd89134e1e259d66940943d15d29b159ac.zip |
rc: fix $ifs bug introduced with utf-8 code
R=rsc
http://codereview.appspot.com/4187050
Diffstat (limited to 'src/cmd/rc')
-rw-r--r-- | src/cmd/rc/havefork.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/rc/havefork.c b/src/cmd/rc/havefork.c index 549b1966..dc0ca2e8 100644 --- 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){ |