summaryrefslogtreecommitdiff
path: root/tests/test-suite/ltests.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-02-05 10:38:12 -0800
committerdaurnimator <quae@daurnimator.com>2018-02-05 10:38:17 -0800
commit68847e42b4d9deaa98e2367b13348f72e9dc7865 (patch)
treeb25af462024e4b8a82c799b930641581b8fadcea /tests/test-suite/ltests.js
parente66b47a2eb4ccdeb81adc4a8f668ce005d1c9a5e (diff)
downloadfengari-68847e42b4d9deaa98e2367b13348f72e9dc7865.tar.gz
fengari-68847e42b4d9deaa98e2367b13348f72e9dc7865.tar.bz2
fengari-68847e42b4d9deaa98e2367b13348f72e9dc7865.zip
tests/test-suite/ltests.js: Push copy of TValue to stack, not original
Fixes https://github.com/fengari-lua/fengari/commit/0d91aed9be2b4761e00d371410140c4b541eb14e#commitcomment-22312635
Diffstat (limited to 'tests/test-suite/ltests.js')
-rw-r--r--tests/test-suite/ltests.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-suite/ltests.js b/tests/test-suite/ltests.js
index 0b47f65..4cadcd4 100644
--- a/tests/test-suite/ltests.js
+++ b/tests/test-suite/ltests.js
@@ -12,6 +12,7 @@ const {
} = require("../../src/fengaricore.js");
const ljstype = require('../../src/ljstype.js');
const lopcodes = require('../../src/lopcodes.js');
+const { pushobj2s } = require('../../src/lobject.js');
const sprintf = require('sprintf-js').sprintf;
const delimits = [" ", "\t", "\n", ",", ";"].map(e => e.charCodeAt(0));
@@ -781,7 +782,7 @@ const setnameval = function(L, name, val) {
};
const pushobject = function(L, o){
- L.stack[L.top++] = o;
+ pushobj2s(L, o);
assert(L.top <= L.ci.top, "stack overflow");
};