From 1ffaccfbd2f6fb2b8e029f1405b918fe7a12810f Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Mon, 24 May 2021 21:10:27 +0200 Subject: [PATCH] Missed a check for empty tables. --- errors.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors.lua b/errors.lua index 7fc94e3..f0dc592 100644 --- a/errors.lua +++ b/errors.lua @@ -93,7 +93,7 @@ local function correct_error (self, module_suffix, format_msg, gotten_string, po -- Do stuff local possible_strings = string_dist.strings_with_highest_similarity(gotten_string, possible_strings) - local list_string = format_probable_strings(possible_strings, 3) + local list_string = #possible_strings > 0 and format_probable_strings(possible_strings, 3) or "" -- Format error(('[%s%s]: '..format_msg):format(self.module_name, module_suffix, gotten_string, list_string), lvl + 1) end