From 30b23bdd3a25ee06784dde1ca03ab90fbe11c992 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 May 2017 13:46:04 +1000 Subject: src/lapi.js: When joining upvalues, increase reference count on copied upvalue --- src/lapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2