summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-02 14:39:41 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-02 14:39:41 +1000
commit77480d0f313b12272fd594d1bade97c4a2b7c8df (patch)
treed8a08c703b24af0bfd979e76742d7a049410a0eb
parent91427896625e01ce2ab7171e1cf2369c89e53658 (diff)
downloadfengari-77480d0f313b12272fd594d1bade97c4a2b7c8df.tar.gz
fengari-77480d0f313b12272fd594d1bade97c4a2b7c8df.tar.bz2
fengari-77480d0f313b12272fd594d1bade97c4a2b7c8df.zip
src/lfunc.js: Pass arguments to LClosure constructor
-rw-r--r--src/lfunc.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index 3f8fe2d..e12816d 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -56,9 +56,7 @@ class UpVal {
}
const luaF_newLclosure = function(L, n) {
- let c = new lobject.LClosure();
- c.p = null;
- c.nupvalues = n;
+ let c = new lobject.LClosure(L, n);
while (n--) c.upvals[n] = null;
return c;
};