commit 8f1766f

Devine Lu Linvega  ·  2024-01-21 18:01:58 +0000 UTC
parent 2eb7c87
(screen) Catch offscreen pixel
1 files changed,  +1, -1
+1, -1
1@@ -289,7 +289,7 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
2 		/* pixel mode */
3 		else {
4 			Uint16 w = uxn_screen.width;
5-			if(rX < w && rY < uxn_screen.height)
6+			if(rX > 0 && rY > 0 && rX < w && rY < uxn_screen.height)
7 				layer[rX + rY * w] = color;
8 			screen_change(rX, rY, rX + 1, rY + 1);
9 			if(rMX) rX++;