Skip to content

Commit 7cfb8bd

Browse files
Fix item range crash (#630)
1 parent 2201aac commit 7cfb8bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Modules/ItemTools.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function itemLib.applyRange(line, range, valueScalar, baseValueScalar)
7676
local strippedLine = line:gsub("([%+-]?)%((%-?%d+%.?%d*)%-(%-?%d+%.?%d*)%)", function(sign, min, max)
7777
local value = min + range * (tonumber(max) - min)
7878
if sign == "-" then value = value * -1 end
79-
return (sign == "+" and value > 0 ) and sign..tostring(value) or tostring(value)
79+
return (sign == "+" and value >= 0 ) and sign..tostring(value) or tostring(value)
8080
end)
8181
:gsub("%-(%d+%.?%d*%%) (%a+)", antonymFunc)
8282
:gsub("(%-?%d+%.?%d*)", function(value)

0 commit comments

Comments
 (0)