summaryrefslogtreecommitdiff
path: root/sys/src/cmd/rc
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-01-02 03:33:34 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-01-02 03:33:34 +0000
commit11d573d7f9a3163224195f312f53322e9076a8fe (patch)
tree50c225d8ccf7fcb42882741e4ef4ed2683eb32f2 /sys/src/cmd/rc
parentc4e30bede2f79c42dacb8c91713abf4a4d91c45c (diff)
rc: rstr() shouldnt skip trailing NUL bytes (thanks ori)
Diffstat (limited to 'sys/src/cmd/rc')
-rw-r--r--sys/src/cmd/rc/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/cmd/rc/io.c b/sys/src/cmd/rc/io.c
index 6c89b048f..e4b3258e4 100644
--- a/sys/src/cmd/rc/io.c
+++ b/sys/src/cmd/rc/io.c
@@ -90,7 +90,7 @@ rstr(io *b, char *stop)
l = rchr(b);
if(l == EOF)
return 0;
- } while(strchr(stop, l));
+ } while(l && strchr(stop, l));
b->bufp--;
s = 0;