summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2017-02-11 19:35:39 +0100
committerWuzzy <almikes@aol.com>2017-02-11 19:35:39 +0100
commit74d71cad2a0dba91f3abc9ce02f6b802c6a4855f (patch)
treeee1630e08ae0506ea807259bc5c226653eaad204
parentdfd7cae20fd8003f69986c93169ddd6678384961 (diff)
Fix crash when tool has empty times table
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
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