From 6482d1ddc52f26d0a8e2e2a398276db73fbaa2bf Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Thu, 23 Feb 2017 15:02:16 +0100 Subject: coroutine.running, upvalue need to be attached to their thread --- src/lobject.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lobject.js') diff --git a/src/lobject.js b/src/lobject.js index 4e4b701..086af00 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -163,13 +163,13 @@ class Table extends TValue { class LClosure extends TValue { - constructor(n) { + constructor(L, n) { super(CT.LUA_TLCL, null); this.p = null; this.nupvalues = n; - let _ENV = new UpVal(); + let _ENV = new UpVal(L); _ENV.refcount = 0; _ENV.v = null; _ENV.u.open.next = null; -- cgit v1.2.3-54-g00ecf