diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-01-02 03:33:34 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-01-02 03:33:34 +0000 |
commit | 11d573d7f9a3163224195f312f53322e9076a8fe (patch) | |
tree | 50c225d8ccf7fcb42882741e4ef4ed2683eb32f2 /sys/src/cmd/rc | |
parent | c4e30bede2f79c42dacb8c91713abf4a4d91c45c (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.c | 2 |
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; |