diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-16 16:25:11 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-16 16:25:11 -0300 |
commit | f5e55be2a0ce64066c1b0554675633b92c91fafb (patch) | |
tree | ef50204da94f49c8f788aad5f94557ed873b1fb6 /ltests.c | |
parent | 9f0c0fe0de64bc41efea73a2da881ff0a1036a03 (diff) | |
download | lua-v5.4.tar.gz lua-v5.4.tar.bz2 lua-v5.4.zip |
Bug: Missing error status in panic functionv5.4
'luaD_throw' may call 'luaE_resetthread', which returns an error code
but clears 'L->status'; so, 'luaD_throw' should set that status again.
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1655,6 +1655,9 @@ static int runC (lua_State *L, lua_State *L1, const char *pc) { | |||
1655 | int level = getnum; | 1655 | int level = getnum; |
1656 | luaL_traceback(L1, L1, msg, level); | 1656 | luaL_traceback(L1, L1, msg, level); |
1657 | } | 1657 | } |
1658 | else if EQ("threadstatus") { | ||
1659 | lua_pushstring(L1, statcodes[lua_status(L1)]); | ||
1660 | } | ||
1658 | else if EQ("return") { | 1661 | else if EQ("return") { |
1659 | int n = getnum; | 1662 | int n = getnum; |
1660 | if (L1 != L) { | 1663 | if (L1 != L) { |