mirror of
https://github.com/lua/lua.git
synced 2026-08-03 03:49:04 +00:00
Bug: Missing error status in panic function
'luaD_throw' may call 'luaE_resetthread', which returns an error code but clears 'L->status'; so, 'luaD_throw' should set that status again.
This commit is contained in:
@@ -399,6 +399,10 @@ do
|
||||
-- trivial error
|
||||
assert(T.checkpanic("pushstring hi; error") == "hi")
|
||||
|
||||
-- thread status inside panic (bug in 5.4.4)
|
||||
assert(T.checkpanic("pushstring hi; error", "threadstatus; return 2") ==
|
||||
"ERRRUN")
|
||||
|
||||
-- using the stack inside panic
|
||||
assert(T.checkpanic("pushstring hi; error;",
|
||||
[[checkstack 5 XX
|
||||
|
||||
Reference in New Issue
Block a user