From 6316cab500cdaa944c6d2ef886138e7e9da0cc7c Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Sat, 18 Feb 2017 07:59:06 +0100 Subject: Corrected lua_gettop, print works ! --- src/lapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index dc8ca68..ece02e0 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -71,7 +71,7 @@ const lua_absindex = function(L, idx) { }; const lua_gettop = function(L) { - return L.top - 1; + return L.top - (L.ci.funcOff + 1); }; const lua_pushvalue = function(L, idx) { -- cgit v1.2.3-70-g09d2