diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-06-12 16:02:01 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-06-12 16:02:01 -0300 |
| commit | b529aefc531276775f8827052d5594749232cf07 (patch) | |
| tree | 722379af2da40ede4e8c46f1f5edfa0b7d606a58 /lauxlib.c | |
| parent | d51022bf9e496ae4a7276b600d2755becc7d4323 (diff) | |
| download | lua-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.c | 1 |
1 files changed, 1 insertions, 0 deletions
| @@ -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.'? */ |
