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