Skip to content

Commit f68c26a

Browse files
committed
Fix "push" and "pop"
1 parent d19e1a5 commit f68c26a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/easycoder.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ const EasyCoder_Core = {
11521152
if (!target.isVHolder) {
11531153
program.variableDoesNotHoldAValueError(command.lino, target.name);
11541154
}
1155-
const value = program.getValue(program.dataStack.pop());
1155+
const value = program.dataStack.pop();
11561156
target.value[target.index] = {
11571157
type: value.type,
11581158
numeric: value.numeric,
@@ -1205,7 +1205,7 @@ const EasyCoder_Core = {
12051205

12061206
run: program => {
12071207
const command = program[program.pc];
1208-
program.dataStack.push(command.value);
1208+
program.dataStack.push(program.getValue(command.value));
12091209
return command.pc + 1;
12101210
}
12111211
},

js/easycoder/Core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ const EasyCoder_Core = {
11521152
if (!target.isVHolder) {
11531153
program.variableDoesNotHoldAValueError(command.lino, target.name);
11541154
}
1155-
const value = program.getValue(program.dataStack.pop());
1155+
const value = program.dataStack.pop();
11561156
target.value[target.index] = {
11571157
type: value.type,
11581158
numeric: value.numeric,
@@ -1205,7 +1205,7 @@ const EasyCoder_Core = {
12051205

12061206
run: program => {
12071207
const command = program[program.pc];
1208-
program.dataStack.push(command.value);
1208+
program.dataStack.push(program.getValue(command.value));
12091209
return command.pc + 1;
12101210
}
12111211
},

0 commit comments

Comments
 (0)