summaryrefslogtreecommitdiff
path: root/src/units.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/units.cpp')
-rw-r--r--src/units.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/units.cpp b/src/units.cpp
index db9faadd1..edf9c749a 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -208,8 +208,10 @@ std::string formatUnit(int value, int type)
ul = ud.levels[i];
if (ul.count)
+ {
nextAmount = levelAmount / ul.count;
- levelAmount %= ul.count;
+ levelAmount %= ul.count;
+ }
if (levelAmount > 0) output = strprintf("%d%s",
levelAmount, pl.symbol.c_str()) + output;