1
0

Missed a check for empty tables.

This commit is contained in:
Jon Michael Aanes 2021-05-24 21:10:27 +02:00
parent 99650fb573
commit 1ffaccfbd2

View File

@ -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