mirror of
https://github.com/minetest-mods/digilines.git
synced 2024-09-27 22:30:22 +02:00
less confusing code
Co-authored-by: Christopher Head <chead@chead.ca>
This commit is contained in:
parent
d3fecd94e4
commit
b73fc28f11
2
lcd.lua
2
lcd.lua
|
@ -97,7 +97,7 @@ local create_lines = function(text)
|
||||||
remaining = remaining - 1
|
remaining = remaining - 1
|
||||||
end
|
end
|
||||||
if remaining < string.len(word) then
|
if remaining < string.len(word) then
|
||||||
line = line .. string.sub(word, 1, math.min(remaining, string.len(word)))
|
line = line .. string.sub(word, 1, remaining)
|
||||||
word = string.sub(word, remaining+1, string.len(word))
|
word = string.sub(word, remaining+1, string.len(word))
|
||||||
if flush_line_and_check_for_return() then return tab end
|
if flush_line_and_check_for_return() then return tab end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user