From b9723c0b1ed0580268aaac058866bc1d1366b783 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 21 Apr 2024 12:17:44 -0400 Subject: Fixed commas. --- src/lpm.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lpm.lua b/src/lpm.lua index e39d1a9..e59fcc0 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -2452,13 +2452,15 @@ not commonly used publically. local func, err = load("local addon = ... " .. (amount == 2 and "return" or "") .. " " .. chunk) if err then error(string.format("can't parse chunk %s: %s", chunk, err)) end result[i] = func + offset = arg:find(",", e + 1) + if offset then offset = offset + 1 else offset = #arg end + else + s,e = arg:find("%s*,%s*", offset) + if not e then s,e = #arg+1, #arg end + if offset >= e then break end + result[i] = arg:sub(offset, s - 1) offset = e + 1 end - s,e = arg:find("%s*,%s*", offset) - if not e then s,e = #arg+1, #arg end - if offset >= e then break end - result[i] = arg:sub(offset, s - 1) - offset = e + 1 i = i + 1 end if ARGS["table"] then -- cgit v1.2.3