--- /n/fossil/sys/src/9/bcm/screen.c Mon Aug 8 19:43:59 2022 +++ /sys/src/9/bcm/screen.c Thu Dec 22 10:35:23 2022 @@ -508,7 +508,7 @@ 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]) { --- /n/fossil/sys/src/9/omap/screen.c Wed Oct 27 22:26:00 2010 +++ /sys/src/9/omap/screen.c Thu Dec 22 10:35:41 2022 @@ -735,7 +735,7 @@ 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]) { --- /n/fossil/sys/src/9/loongson/screen.c Thu Dec 22 10:42:22 2022 +++ /sys/src/9/loongson/screen.c Thu Dec 22 10:38:56 2022 @@ -365,7 +365,7 @@ 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]) {