0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-28 08:43:02 +00:00

Warn for out of bounds

This commit is contained in:
neauoire 2021-10-23 08:48:11 -07:00
parent 540fd70b9b
commit 6799b5f78e

View file

@ -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;
}