Plan 9 from Bell Labs’s /usr/web/sources/contrib/yk/dist/9legacy/applied/drawterm-screenputc.diff

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--- /sys/src/cmd/unix/drawterm/kern/term.c
+++ /sys/src/cmd/unix/drawterm/kern/term.c
@@ -126,7 +126,7 @@ screenputc(char *buf)
 	static int *xp;
 	static int xbuf[256];
 
-	if(xp < xbuf || xp >= &xbuf[sizeof(xbuf)])
+	if(xp < xbuf || xp >= &xbuf[nelem(xbuf)])
 		xp = xbuf;
 
 	switch(buf[0]) {

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].