From a89ed25609786d02668ccd64dcd864b2068c86e8 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Mon, 3 Mar 2025 15:13:56 +1300 Subject: [PATCH] Use local variable --- layout.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout.lua b/layout.lua index a0969d2..e46554a 100644 --- a/layout.lua +++ b/layout.lua @@ -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