aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 13:46:04 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 13:46:04 +1000
commit30b23bdd3a25ee06784dde1ca03ab90fbe11c992 (patch)
treeffee6350376ed640c9e116ec75465e09d9417d27
parent73d641f4cb9788757188ee1147c558bd07a16a93 (diff)
downloadfengari-30b23bdd3a25ee06784dde1ca03ab90fbe11c992.tar.gz
fengari-30b23bdd3a25ee06784dde1ca03ab90fbe11c992.tar.bz2
fengari-30b23bdd3a25ee06784dde1ca03ab90fbe11c992.zip
src/lapi.js: When joining upvalues, increase reference count on copied upvalue
-rw-r--r--src/lapi.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 529a009..42e87a9 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -1108,8 +1108,8 @@ const lua_upvaluejoin = function(L, fidx1, n1, fidx2, n2) {
let up1 = ref1.upvalOff;
let up2 = ref2.upval;
let f1 = ref1.closure;
-
f1.upvals[up1] = up2;
+ up2.refcount++;
};
// This functions are only there for compatibility purposes