From 77480d0f313b12272fd594d1bade97c4a2b7c8df Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 2 May 2017 14:39:41 +1000 Subject: src/lfunc.js: Pass arguments to LClosure constructor --- src/lfunc.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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; }; -- cgit v1.2.3-70-g09d2