shithub: front

Download patch

ref: f0dc44f76bbd903e092d5ab067a2de9960b183b9
parent: 3762117011aca30ca916573414b02a0963c91718
author: qwx <qwx@sciops.net>
date: Wed Aug 6 07:18:44 EDT 2025

eui: get rid of useless and uninformative n-1 read size

--- a/sys/src/games/eui.c
+++ b/sys/src/games/eui.c
@@ -61,8 +61,7 @@
 static void
 joyproc(void *)
 {
-	char *s, *down[9];
-	static char buf[64];
+	char buf[64], *s, *down[9];
 	int n, k, j;
 	Kfn *kp;
 
@@ -69,7 +68,7 @@
 	j = 1;
 
 	for(;;){
-		n = read(0, buf, sizeof(buf) - 1);
+		n = read(0, buf, sizeof(buf));
 		if(n <= 0)
 			sysfatal("read: %r");
 		buf[n-1] = 0;
--