git: 9front

Download patch

ref: a5c6ff48025609ce50f2ed3539a3d9cf68ba44de
parent: f75078851080ad65bcc57adf0892e8aa6d2cfd2f
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jan 1 22:33:34 EST 2022

rc: rstr() shouldnt skip trailing NUL bytes (thanks ori)

--- a/sys/src/cmd/rc/io.c
+++ b/sys/src/cmd/rc/io.c
@@ -90,7 +90,7 @@
 		l = rchr(b);
 		if(l == EOF)
 			return 0;
-	} while(strchr(stop, l));
+	} while(l && strchr(stop, l));
 	b->bufp--;
 
 	s = 0;
--