Builtin: fix word-wrap hack in error window

master
MoNTE48 2021-05-30 21:09:54 +02:00
parent cbd53c8574
commit 191bb343f9
1 changed files with 3 additions and 2 deletions

View File

@ -54,6 +54,7 @@ end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local sub8 = utf8.sub
local function wordwrap_quickhack(str)
local res = ""
local ar = str:split("\n")
@ -65,8 +66,8 @@ local function wordwrap_quickhack(str)
if res ~= "" then
res = res .. ","
end
res = res .. core.formspec_escape(text:sub(1, 79))
text = text:sub(80, #text)
res = res .. core.formspec_escape(sub8(text, 1, 79))
text = sub8(text, 80, #text)
end
if res ~= "" then
res = res .. ","