From 8f4f71985a8be5707914d619afb0564fcb116522 Mon Sep 17 00:00:00 2001 From: SpinnySpiwal <99829343+SpinnySpiwal@users.noreply.github.com> Date: Sun, 24 Aug 2025 19:38:42 +0100 Subject: [PATCH] Fixed variable name 'length' being 'lenght' --- src/prometheus/util.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/prometheus/util.lua b/src/prometheus/util.lua index 86960aa..1c64bf4 100644 --- a/src/prometheus/util.lua +++ b/src/prometheus/util.lua @@ -224,20 +224,20 @@ local function readU32(arr) end local function bytesToString(arr) - local lenght = arr.n or #arr; + local length = arr.n or #arr; - if lenght < MAX_UNPACK_COUNT then + if length < MAX_UNPACK_COUNT then return string.char(table.unpack(arr)) end local str = ""; - local overflow = lenght % MAX_UNPACK_COUNT; + local overflow = length % MAX_UNPACK_COUNT; for i = 1, (#arr - overflow) / MAX_UNPACK_COUNT do str = str .. string.char(table.unpack(arr, (i - 1) * MAX_UNPACK_COUNT + 1, i * MAX_UNPACK_COUNT)); end - return str..(overflow > 0 and string.char(table.unpack(arr, lenght - overflow + 1, lenght)) or ""); + return str..(overflow > 0 and string.char(table.unpack(arr, length - overflow + 1, length)) or ""); end local function isNaN(n)