From 68847e42b4d9deaa98e2367b13348f72e9dc7865 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 5 Feb 2018 10:38:12 -0800 Subject: tests/test-suite/ltests.js: Push copy of TValue to stack, not original Fixes https://github.com/fengari-lua/fengari/commit/0d91aed9be2b4761e00d371410140c4b541eb14e#commitcomment-22312635 --- tests/test-suite/ltests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"); }; -- cgit v1.2.3-54-g00ecf