mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-05-06 17:34:15 +00:00
Fixed length check on function name in expect
(#589)
This commit is contained in:
parent
fff8353451
commit
486f41f082
@ -53,7 +53,7 @@ local function expect(index, value, ...)
|
|||||||
local name
|
local name
|
||||||
if native_type(debug) == "table" and native_type(debug.getinfo) == "function" then
|
if native_type(debug) == "table" and native_type(debug.getinfo) == "function" then
|
||||||
local ok, info = pcall(debug.getinfo, 3, "nS")
|
local ok, info = pcall(debug.getinfo, 3, "nS")
|
||||||
if ok and info.name and #info.name ~= "" and info.what ~= "C" then name = info.name end
|
if ok and info.name and info.name ~= "" and info.what ~= "C" then name = info.name end
|
||||||
end
|
end
|
||||||
|
|
||||||
local type_names = get_type_names(...)
|
local type_names = get_type_names(...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user