Use local variable

This commit is contained in:
luk3yx 2025-03-03 15:13:56 +13:00
parent 8e4d033cd7
commit a89ed25609

View File

@ -92,11 +92,11 @@ local function get_lines_size(lines)
return w, LABEL_HEIGHT * #lines
end
local ASTERISK = ("*"):byte()
local ASTERISK = byte("*")
local function parse_font_size(str)
-- Only support *1.1 etc for now, I don't know if the other formats are
-- used
if str and type(str) == "string" and str:byte(1) == ASTERISK then
if str and type(str) == "string" and byte(str, 1) == ASTERISK then
return tonumber(str:sub(2)) or 1
end
return 1