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 return w, LABEL_HEIGHT * #lines
end end
local ASTERISK = ("*"):byte() local ASTERISK = byte("*")
local function parse_font_size(str) local function parse_font_size(str)
-- Only support *1.1 etc for now, I don't know if the other formats are -- Only support *1.1 etc for now, I don't know if the other formats are
-- used -- 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 return tonumber(str:sub(2)) or 1
end end
return 1 return 1