From 11d573d7f9a3163224195f312f53322e9076a8fe Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 2 Jan 2022 03:33:34 +0000 Subject: [PATCH] rc: rstr() shouldnt skip trailing NUL bytes (thanks ori) --- sys/src/cmd/rc/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;