mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
Bug: cannot allow the call 'debug.getinfo(0, ">")'
A 'what' argument starting with '>' indicates that there is a function in the C stack, which won't be there if the first argument is not a function.
This commit is contained in:
parent
bc970005ce
commit
38cc7d40a4
2 changed files with 2 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ end
|
|||
|
||||
do
|
||||
assert(not pcall(debug.getinfo, print, "X")) -- invalid option
|
||||
assert(not pcall(debug.getinfo, 0, ">")) -- invalid option
|
||||
assert(not debug.getinfo(1000)) -- out of range level
|
||||
assert(not debug.getinfo(-1)) -- out of range level
|
||||
local a = debug.getinfo(print)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue