From c894799a5bced3247a24af93082fb0e58a016802 Mon Sep 17 00:00:00 2001 From: duncathan Date: Fri, 6 Mar 2020 00:13:57 -0600 Subject: [PATCH] fixes visual error in hint text --- src/database/items.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database/items.lua b/src/database/items.lua index 257962a..746360c 100644 --- a/src/database/items.lua +++ b/src/database/items.lua @@ -501,12 +501,12 @@ local function _hint(message, l) local split = 1 line1 = message:sub(split, split+MSGBOXLIMIT) - if line1:find(PATTERN) then + if line1:find(PATTERN) and #message > MSGBOXLIMIT then line1 = line1:sub(1, line1:find(PATTERN)) split = line1:find(PATTERN)+split line2 = "\r\n" .. message:sub(split, split+MSGBOXLIMIT) - if line2:find(PATTERN) then + if line2:find(PATTERN) and #message > MSGBOXLIMIT*2 then line2 = line2:sub(1, line2:find(PATTERN)) split = line2:find(PATTERN)+split line3 = "\r\n" .. message:sub(split, split+MSGBOXLIMIT)