Skip to content

Commit 46ed0d5

Browse files
authored
Merge pull request #551 from QuickStick123/fix-typo-in-string-formatting
Fix numbers not showing to correct decimal places in some UI modLines
2 parents 1682906 + db306b6 commit 46ed0d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Modules/ItemTools.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ function itemLib.formatValue(value, baseValueScalar, valueScalar, precision, dis
4949
value = value / precision -- convert back to display space
5050
if displayPrecision then value = roundSymmetric(value, displayPrecision) end -- presentation
5151
if displayPrecision and not ifRequired then -- whitespace is needed
52-
return string.format("%"..displayPrecision.."f", value)
52+
return string.format("%."..displayPrecision.."f", value)
5353
elseif displayPrecision then
54-
return tostring(roundSymmetric(value, displayPrecision))
54+
return tostring(value, displayPrecision)
5555
else
5656
return tostring(roundSymmetric(value, precision and m_min(2, m_floor(math.log(precision, 10))) or 2)) -- max decimals ingame is 2
5757
end

0 commit comments

Comments
 (0)