From 58bd4012506e6dfc92dd819d4e43acad18e8b914 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Thu, 27 Apr 2017 17:58:58 +1000 Subject: lua_State shouldn't subclass TValue --- src/lapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lapi.js') diff --git a/src/lapi.js b/src/lapi.js index 52bc8fa..a758a66 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -305,7 +305,7 @@ const lua_pushlightuserdata = function(L, p) { }; const lua_pushthread = function(L) { - L.stack[L.top++] = L; + L.stack[L.top++] = new TValue(CT.LUA_TTHREAD, L); assert(L.top <= L.ci.top, "stack overflow"); return L.l_G.mainthread === L; -- cgit v1.2.3-54-g00ecf