aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lfunc.js4
-rw-r--r--src/lstate.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index bde96d7..3f8fe2d 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -81,7 +81,7 @@ const findupval = function(L, level) {
uv.u.open.next = pp;
uv.u.open.touched = true;
- pp = uv;
+ L.openupval = uv;
uv.v = level;
@@ -96,7 +96,7 @@ const luaF_close = function(L, level) {
assert(uv.isopen());
L.openupval = uv.u.open.next; /* remove from 'open' list */
if (uv.refcount > 0) {
- uv.value = L.stack[uv.v];
+ uv.u.value = L.stack[uv.v];
uv.v = null;
}
}
diff --git a/src/lstate.js b/src/lstate.js
index d95889b..5842562 100644
--- a/src/lstate.js
+++ b/src/lstate.js
@@ -50,7 +50,7 @@ class lua_State extends lobject.TValue {
this.ci = null;
this.ciOff = null;
this.stack = [];
- this.openupval = [];
+ this.openupval = null;
this.status = TS.LUA_OK;
this.next = null;
this.twups = [this];
@@ -138,7 +138,7 @@ const preinit_thread = function(L, g) {
L.basehookcount = 0;
L.allowhook = 1;
L.hookcount = L.basehookcount;
- L.openupval = [];
+ L.openupval = null;
L.nny = 1;
L.status = TS.LUA_OK;
L.errfunc = 0;