better readable condition
Co-authored-by: Christopher Head <chead@chead.ca>
This commit is contained in:
parent
c5aeb9e8c5
commit
d3fecd94e4
2
lcd.lua
2
lcd.lua
|
@ -96,7 +96,7 @@ local create_lines = function(text)
|
|||
line = line .. " "
|
||||
remaining = remaining - 1
|
||||
end
|
||||
if remaining - string.len(word) < 0 then
|
||||
if remaining < string.len(word) then
|
||||
line = line .. string.sub(word, 1, math.min(remaining, string.len(word)))
|
||||
word = string.sub(word, remaining+1, string.len(word))
|
||||
if flush_line_and_check_for_return() then return tab end
|
||||
|
|
Loading…
Reference in New Issue