From 74d71cad2a0dba91f3abc9ce02f6b802c6a4855f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 11 Feb 2017 19:35:39 +0100 Subject: Fix crash when tool has empty times table --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3c028f2..e26ce09 100644 --- a/init.lua +++ b/init.lua @@ -987,7 +987,7 @@ doc.add_category("tools", { end realuses = uses * math.pow(3, maxlevel) end - if v.times then + if v.times and #v.times > 1 then for rating, time in pairs(v.times) do local realtime = time / maxlevel if mintime == nil or realtime < mintime then -- cgit v1.2.3