Fixed LUA common library crashing when passing an empty status

This commit is contained in:
Unknown 2019-12-27 23:36:32 +01:00
parent 599e441cc8
commit 3c752f7fe3
2 changed files with 2 additions and 2 deletions

View file

@ -295,7 +295,7 @@ local function status_show(isWarning, text)
status_line = 1
status_isWarning = isWarning
status_text = {}
local textToParse = text or "???"
local textToParse = (text and text ~= "") and text or "???"
for line in string.gmatch(textToParse, "[^\n]+") do
if line ~= "" then
table.insert(status_text, line)

View file

@ -301,7 +301,7 @@ local function status_show(isWarning, text)
status_line = 1
status_isWarning = isWarning
status_text = {}
local textToParse = text or "???"
local textToParse = (text and text ~= "") and text or "???"
for line in string.gmatch(textToParse, "[^\n]+") do
if line ~= "" then
table.insert(status_text, line)