1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-30 09:07:55 +00:00

Fixed length check on function name in expect (#589)

This commit is contained in:
Merith-TK
2021-04-22 11:54:56 -07:00
parent 98aabe2cfb
commit f8a58dbcb1
2 changed files with 7 additions and 1 deletions

View File

@@ -356,3 +356,9 @@ fff8353451451be5ae31e0f63d8e529b127fd186
Remove extra space (#586) Remove extra space (#586)
``` ```
```
486f41f08286ddcfad91d72b83a9361bd9c215cb
Fixed length check on function name in `expect` (#589)
```

View File

@@ -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(...)