Fixed util.getTimeFromString returning unnecessary floating point

This commit is contained in:
Timo Smit 2017-01-12 13:54:02 +01:00
parent a14f5f1b32
commit f0af3cfe03

View file

@ -129,7 +129,9 @@ end
function util.getTimeFromString(str)
local amount, unit = string.match(str, "^([0-9]+)([smhdwy])$")
if not (amount and unit) then return false end
if not (amount and unit) then return nil end
amount = math.floor(amount)
local multiplier = {
["s"] = function(a) return a end,