forked from nalc/homedecor_modpack
fix crash on illegal text input
(ok it's probably the wrong way)
This commit is contained in:
parent
651fea2a00
commit
9f8e99ea95
|
@ -211,6 +211,7 @@ local fences_with_sign = { }
|
||||||
local function split_lines_and_words(text)
|
local function split_lines_and_words(text)
|
||||||
local lines = { }
|
local lines = { }
|
||||||
local line = { }
|
local line = { }
|
||||||
|
if not text then return end
|
||||||
for word in text:gmatch("%S+") do
|
for word in text:gmatch("%S+") do
|
||||||
if word == "|" then
|
if word == "|" then
|
||||||
table.insert(lines, line)
|
table.insert(lines, line)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user