summaryrefslogtreecommitdiff
path: root/main.myr
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 13:51:42 -0500
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2020-01-01 13:51:42 -0500
commit39027f3fa356e5d00815564116b07f43103ce0d5 (patch)
tree6f6bfb1d1d9724f803ae02d03842d5e1532c0f30 /main.myr
parent438670cf690858d1b4f884582330eaaa3acd29b3 (diff)
Fix stack overflow check
Diffstat (limited to 'main.myr')
-rw-r--r--main.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.myr b/main.myr
index 292d2d6..cf6897b 100644
--- a/main.myr
+++ b/main.myr
@@ -92,8 +92,8 @@ const main = {
// CALL
| 0x2:
sp++
- if sp > stksz
- std.die("stack overflow")
+ if sp >= stksz
+ std.die("stack overflow\n")
;;
stk[sp] = pc
pc = (opcode & 0x0f : uint16)