aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-04 16:40:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-04 16:40:53 -0300
commit2db966fcbf757775c842bc66449d7e697826aa1d (patch)
tree8eba3e6289af6a2038802754de4197931c5d3ec3 /lauxlib.c
parentae9a0cbbb446499e759acae47664d1d136d7ba90 (diff)
downloadlua-2db966fcbf757775c842bc66449d7e697826aa1d.tar.gz
lua-2db966fcbf757775c842bc66449d7e697826aa1d.tar.bz2
lua-2db966fcbf757775c842bc66449d7e697826aa1d.zip
Bug: luaL_traceback may need more than 5 stack slots
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lauxlib.c b/lauxlib.c
index 28bff274..baa67ce6 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -80,6 +80,7 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) {
80 int top = lua_gettop(L); 80 int top = lua_gettop(L);
81 lua_getinfo(L, "f", ar); /* push function */ 81 lua_getinfo(L, "f", ar); /* push function */
82 lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); 82 lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
83 luaL_checkstack(L, 6, "not enough stack"); /* slots for 'findfield' */
83 if (findfield(L, top + 1, 2)) { 84 if (findfield(L, top + 1, 2)) {
84 const char *name = lua_tostring(L, -1); 85 const char *name = lua_tostring(L, -1);
85 if (strncmp(name, LUA_GNAME ".", 3) == 0) { /* name start with '_G.'? */ 86 if (strncmp(name, LUA_GNAME ".", 3) == 0) { /* name start with '_G.'? */