summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index c695604..ca1bb42 100644
--- a/init.lua
+++ b/init.lua
@@ -187,7 +187,11 @@ local factoid_toolcaps = function(tool_capabilities, check_uses)
local maxtime = v.times[rating]
local mintime
local mintimestr, maxtimestr
- mintime = maxtime / maxlevel
+ local maxlevel_calc = maxlevel
+ if maxlevel_calc < 1 then
+ maxlevel_calc = 1
+ end
+ mintime = maxtime / maxlevel_calc
mintimestr = string.format("%.1f", mintime)
maxtimestr = string.format("%.1f", maxtime)
if mintimestr ~= maxtimestr then