git: 9front

Download patch

ref: 6ac1c151c27bfe7b2e9f679ac2d7980b02ca1a77
parent: cd3276ce8ee5ec09f11537478e908113bf722746
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;
--