aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-18 07:59:06 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-18 08:04:37 +0100
commit6316cab500cdaa944c6d2ef886138e7e9da0cc7c (patch)
tree63a82e1a374b5d05fac84a3dca27aa46218207cf /src
parentde7046f938975dbdcd6cfaba6f535dec53dfc263 (diff)
downloadfengari-6316cab500cdaa944c6d2ef886138e7e9da0cc7c.tar.gz
fengari-6316cab500cdaa944c6d2ef886138e7e9da0cc7c.tar.bz2
fengari-6316cab500cdaa944c6d2ef886138e7e9da0cc7c.zip
Corrected lua_gettop, print works !
Diffstat (limited to 'src')
-rw-r--r--src/lapi.js2
1 files changed, 1 insertions, 1 deletions
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) {