From 8cd9ec2e98d27b414bc7cff3a5a98b0aad9099ce Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Thu, 14 May 2026 09:09:08 -0700 Subject: Fixes crash on equip --- util.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'util.lua') diff --git a/util.lua b/util.lua index 5fd41d3..8f1de2a 100644 --- a/util.lua +++ b/util.lua @@ -57,6 +57,16 @@ function filter(a, pred) return filtered end +function keys(t) + ks = {} + i = 1 + for k, v in pairs(t) do + ks[i] = k + i += 1 + end + return ks +end + function fmt(x, depth) depth = depth or 1 if (depth > 4) then return "STACK_OVERFLOW" end -- cgit v1.3