mirror of
https://github.com/minetest-mods/digilines.git
synced 2025-07-01 07:50:22 +02:00
save string.len() call
default for third parameter of string.sub() is already to use the rest of the string Co-authored-by: Christopher Head <chead@chead.ca>
This commit is contained in:
2
lcd.lua
2
lcd.lua
@ -98,7 +98,7 @@ local create_lines = function(text)
|
||||
end
|
||||
if remaining < string.len(word) then
|
||||
line = line .. string.sub(word, 1, remaining)
|
||||
word = string.sub(word, remaining+1, string.len(word))
|
||||
word = string.sub(word, remaining+1)
|
||||
if flush_line_and_check_for_return() then return tab end
|
||||
else
|
||||
-- used up the word
|
||||
|
Reference in New Issue
Block a user