From 3c752f7fe3902c8281c4c391ad2700628c9675bc Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 27 Dec 2019 23:36:32 +0100 Subject: [PATCH] Fixed LUA common library crashing when passing an empty status --- .../assets/warpdrive/lua.ComputerCraft/common/warpdriveCommons | 2 +- .../lua.OpenComputers/common/usr/lib/warpdriveCommons.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/warpdrive/lua.ComputerCraft/common/warpdriveCommons b/src/main/resources/assets/warpdrive/lua.ComputerCraft/common/warpdriveCommons index 3964a178..559043b1 100644 --- a/src/main/resources/assets/warpdrive/lua.ComputerCraft/common/warpdriveCommons +++ b/src/main/resources/assets/warpdrive/lua.ComputerCraft/common/warpdriveCommons @@ -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) diff --git a/src/main/resources/assets/warpdrive/lua.OpenComputers/common/usr/lib/warpdriveCommons.lua b/src/main/resources/assets/warpdrive/lua.OpenComputers/common/usr/lib/warpdriveCommons.lua index bc04dc0d..298544d3 100644 --- a/src/main/resources/assets/warpdrive/lua.OpenComputers/common/usr/lib/warpdriveCommons.lua +++ b/src/main/resources/assets/warpdrive/lua.OpenComputers/common/usr/lib/warpdriveCommons.lua @@ -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)