From d3c98c3397d26e9f898603a6cc106899cee18580 Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Fri, 24 Mar 2023 21:16:29 -0400 Subject: [PATCH] fix spritedata() --- util/sprites.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/sprites.lua b/util/sprites.lua index e7218331..5a0b554c 100644 --- a/util/sprites.lua +++ b/util/sprites.lua @@ -1,4 +1,5 @@ +-- Similar to `parseFilename` in data/lib function spritedata(basename) local iter = basename:gmatch("[^-]+") local result = {id = iter(), data = {}} @@ -6,8 +7,8 @@ function spritedata(basename) if flagtext:len() == 1 then result.data[flagtext] = true else - local flag = flagtext.sub(1, 1) - local text = flagtext.sub(2) + local flag = flagtext:sub(1, 1) + local text = flagtext:sub(2) result.data[flag] = text end end