From 6651949665771ce3b8a9e2efaf7ea017b5e99fec Mon Sep 17 00:00:00 2001 From: Peter Nerlich Date: Mon, 7 Dec 2020 14:19:39 +0100 Subject: [PATCH] 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 --- lcd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcd.lua b/lcd.lua index 579e3c8..478fce0 100644 --- a/lcd.lua +++ b/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