uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 44d584dfdbe3da53dbb65a8bc3e3a1f3788c3a1a
parent 59ea5c0a1ac9a942416ee163e227b3ab57049809
Author: neauoire <aliceffekt@gmail.com>
Date:   Wed,  4 Aug 2021 20:14:53 -0700

Re-added the stack bounds clamp

Diffstat:
Metc/mkuxn-fast.lua | 1+
Metc/mkuxn-fast.moon | 1+
Msrc/uxn-fast.c | 1+
Msrc/uxn.c | 1+
4 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/etc/mkuxn-fast.lua b/etc/mkuxn-fast.lua @@ -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) { diff --git a/etc/mkuxn-fast.moon b/etc/mkuxn-fast.moon @@ -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) { diff --git a/src/uxn-fast.c b/src/uxn-fast.c @@ -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) { diff --git a/src/uxn.c b/src/uxn.c @@ -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 */