From 6799b5f78e99c416909f4aa215f41ac84a0c459e Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 23 Oct 2021 08:48:11 -0700 Subject: [PATCH] Warn for out of bounds --- src/uxnasm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uxnasm.c b/src/uxnasm.c index 19729f1..37d607a 100644 --- a/src/uxnasm.c +++ b/src/uxnasm.c @@ -110,6 +110,7 @@ static void pushbyte(Uint8 b, int lit) { if(lit) pushbyte(findopcode("LIT"), 0); + if(p.ptr > LENGTH) fprintf(stderr, "--- Out of bounds(%04x:%02x)\n", p.ptr, b); p.data[p.ptr++] = b; p.length = p.ptr; }