shithub: fork

Download patch

ref: 85a1f9570d6677d0492c3b870880483aaf0f09e5
parent: 91dbae1c87f33e144567156f87b8fb09dbef6b70
author: qwx <qwx@sciops.net>
date: Wed Jan 7 05:37:22 EST 2026

eui: sync with 9front

--- 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,11 +68,11 @@
 	j = 1;
 
 	for(;;){
-		n = read(0, buf, sizeof(buf) - 1);
+		n = read(0, buf, sizeof(buf));
 		if(n <= 0)
 			sysfatal("read: %r");
-		buf[n] = 0;
-		n = getfields(buf, down, nelem(down), 1, " ");
+		buf[n-1] = 0;
+		n = getfields(buf, down, nelem(down), 0, " ");
 		k = 0;
 		for(n--; n >= 0; n--){
 			s = down[n];
--