aboutsummaryrefslogtreecommitdiffstats
path: root/forth.js
diff options
context:
space:
mode:
Diffstat (limited to 'forth.js')
-rw-r--r--forth.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/forth.js b/forth.js
index 436387a..3c7c0d2 100644
--- a/forth.js
+++ b/forth.js
@@ -42,7 +42,7 @@ function forth(print = console.log) {
},
'then' : () => {/*Doing nothing skips the token*/},
'if' : (initialIdx, tokens) => {
- if (!s.pop()) {
+ if (!popNum()) {
let localIdx = initialIdx;
while (tokens[localIdx] && tokens[localIdx] !== 'then') {localIdx++}
return localIdx - initialIdx;