summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js
index ab50af8..e4ef380 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -197,6 +197,9 @@ class CClosure {
this.f = f;
this.nupvalues = n;
this.upvalue = new Array(n); /* list of upvalues as TValues */
+ while (n--) {
+ this.upvalue[n] = new TValue(CT.LUA_TNIL, null);
+ }
}
}