aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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) {