mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-24 06:45:11 +00:00
Created working stack space in case of previous evaluxn overflow
This commit is contained in:
parent
742c52265f
commit
4622a8a061
4 changed files with 4 additions and 0 deletions
|
@ -324,6 +324,7 @@ evaluxn(Uxn *u, Uint16 vec)
|
|||
{
|
||||
Uint8 instr;
|
||||
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) {
|
||||
|
|
|
@ -232,6 +232,7 @@ evaluxn(Uxn *u, Uint16 vec)
|
|||
{
|
||||
Uint8 instr;
|
||||
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) {
|
||||
|
|
|
@ -56,6 +56,7 @@ evaluxn(Uxn *u, Uint16 vec)
|
|||
{
|
||||
Uint8 instr;
|
||||
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) {
|
||||
|
|
|
@ -159,6 +159,7 @@ evaluxn(Uxn *u, Uint16 vec)
|
|||
u->ram.ptr = vec;
|
||||
u->wst.error = 0;
|
||||
u->rst.error = 0;
|
||||
if(u->wst.ptr > 0xf8) u->wst.ptr = 0xf8;
|
||||
while(u->ram.ptr)
|
||||
if(!stepuxn(u, u->ram.dat[u->ram.ptr++]))
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue