diff options
-rw-r--r-- | src/lfunc.js | 3 | ||||
-rw-r--r-- | tests/ldblib.js | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/lfunc.js b/src/lfunc.js index 032f653..bc88702 100644 --- a/src/lfunc.js +++ b/src/lfunc.js @@ -45,7 +45,6 @@ class UpVal { setval(L, ra) { if (this.v !== null) { this.L.stack[this.v] = L.stack[ra]; - this.v = ra; } else this.u.value = L.stack[ra]; } @@ -138,4 +137,4 @@ module.exports.findupval = findupval; module.exports.luaF_close = luaF_close; module.exports.luaF_getlocalname = luaF_getlocalname; module.exports.luaF_initupvals = luaF_initupvals; -module.exports.luaF_newLclosure = luaF_newLclosure;
\ No newline at end of file +module.exports.luaF_newLclosure = luaF_newLclosure; diff --git a/tests/ldblib.js b/tests/ldblib.js index 8d00952..8c3ad7f 100644 --- a/tests/ldblib.js +++ b/tests/ldblib.js @@ -9,7 +9,7 @@ const linit = require('../src/linit.js'); test('debug.sethook', function (t) { let luaCode = ` - result = "" + local result = "" debug.sethook(function (event) result = result .. event .. " " @@ -44,7 +44,7 @@ test('debug.sethook', function (t) { t.strictEqual( lapi.lua_tojsstring(L, -1), - "return count line count line count line count return count line count line count return count line count line count return count line count line ", + "return count line count line count line count return count line count line count return count line count line count return count line return ", "Correct element(s) on the stack" ); |