From 486f41f08286ddcfad91d72b83a9361bd9c215cb Mon Sep 17 00:00:00 2001 From: JackMacWindows Date: Thu, 26 Nov 2020 14:46:03 -0500 Subject: [PATCH] Fixed length check on function name in `expect` (#589) --- .../data/computercraft/lua/rom/modules/main/cc/expect.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/data/computercraft/lua/rom/modules/main/cc/expect.lua b/src/main/resources/data/computercraft/lua/rom/modules/main/cc/expect.lua index 397be085e..6be4e135d 100644 --- a/src/main/resources/data/computercraft/lua/rom/modules/main/cc/expect.lua +++ b/src/main/resources/data/computercraft/lua/rom/modules/main/cc/expect.lua @@ -53,7 +53,7 @@ local function expect(index, value, ...) local name if native_type(debug) == "table" and native_type(debug.getinfo) == "function" then 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 local type_names = get_type_names(...)