diff options
-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){ |