Browse code

Warn for out of bounds

neauoire authored on 23/10/2021 15:48:11
Showing 1 changed files
... ...
@@ -110,6 +110,7 @@ static void
110 110
 pushbyte(Uint8 b, int lit)
111 111
 {
112 112
 	if(lit) pushbyte(findopcode("LIT"), 0);
113
+	if(p.ptr > LENGTH) fprintf(stderr, "--- Out of bounds(%04x:%02x)\n", p.ptr, b);
113 114
 	p.data[p.ptr++] = b;
114 115
 	p.length = p.ptr;
115 116
 }