Re-added the stack bounds clamp

This commit is contained in:
neauoire 2021-08-04 20:14:53 -07:00
parent 59ea5c0a1a
commit 44d584dfdb
4 changed files with 4 additions and 0 deletions

View File

@ -322,6 +322,7 @@ uxn_eval(Uxn *u, Uint16 vec)
if(u->dev[0].dat[0xf])
return 0;
u->ram.ptr = vec;
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
while(u->ram.ptr) {
instr = u->ram.dat[u->ram.ptr++];
switch(instr) {

View File

@ -231,6 +231,7 @@ uxn_eval(Uxn *u, Uint16 vec)
if(u->dev[0].dat[0xf])
return 0;
u->ram.ptr = vec;
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
while(u->ram.ptr) {
instr = u->ram.dat[u->ram.ptr++];
switch(instr) {

View File

@ -45,6 +45,7 @@ uxn_eval(Uxn *u, Uint16 vec)
if(u->dev[0].dat[0xf])
return 0;
u->ram.ptr = vec;
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
while(u->ram.ptr) {
instr = u->ram.dat[u->ram.ptr++];
switch(instr) {

View File

@ -125,6 +125,7 @@ uxn_eval(Uxn *u, Uint16 vec)
if(u->dev[0].dat[0xf])
return 0;
u->ram.ptr = vec;
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
while(u->ram.ptr) {
Uint8 instr = u->ram.dat[u->ram.ptr++];
/* Return Mode */