Simplify stack determination logic.

This commit is contained in:
Andrew Alderwick 2022-01-05 14:02:06 +00:00
parent 646d79fff5
commit 291cb3d1a2
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ uxn_eval(Uxn *u, Uint16 pc)
err: err:
/* set 1 in errcode if it involved the return stack instead of the working stack */ /* set 1 in errcode if it involved the return stack instead of the working stack */
/* (stack overflow & ( instruction opcode was STH or JSR )) ^ Return Mode */ /* (stack overflow & (opcode was STH / JSR)) ^ Return Mode */
errcode |= ((errcode >> 1 & instr >> 1 & instr >> 2 & instr >> 3 & ~instr >> 4) ^ instr >> 6) & 1; errcode |= ((errcode >> 1 & (instr & 0x1e) == 0x0e) ^ instr >> 6) & 1;
return uxn_halt(u, errcode, pc - 1); return uxn_halt(u, errcode, pc - 1);
} }