aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-12 16:02:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-06-12 16:02:01 -0300
commitb529aefc531276775f8827052d5594749232cf07 (patch)
tree722379af2da40ede4e8c46f1f5edfa0b7d606a58 /lauxlib.c
parentd51022bf9e496ae4a7276b600d2755becc7d4323 (diff)
downloadlua-b529aefc531276775f8827052d5594749232cf07.tar.gz
lua-b529aefc531276775f8827052d5594749232cf07.tar.bz2
lua-b529aefc531276775f8827052d5594749232cf07.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 d742fd27..5f8e8f42 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.'? */