shithub: riscv

Download patch

ref: 11d573d7f9a3163224195f312f53322e9076a8fe
parent: c4e30bede2f79c42dacb8c91713abf4a4d91c45c
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;