summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/popups/itempopup.cpp2
-rw-r--r--src/resources/db/itemdb.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 55f77350d..4b35b7118 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -392,7 +392,7 @@ std::string ItemPopup::getOptionsString(const ItemOptionsList *const options)
if (!effect.empty())
effect.append(" / ");
if (field->sign && value[0] != '-')
- value.append("+").append(value);
+ value = std::string("+").append(value);
const std::string format = translator->getStr(field->description);
effect.append(strprintf(format.c_str(),
value.c_str()));
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp
index 5f92fc4e0..542fa6789 100644
--- a/src/resources/db/itemdb.cpp
+++ b/src/resources/db/itemdb.cpp
@@ -145,7 +145,7 @@ static void readFields(std::string &effect,
if (!effect.empty())
effect.append(" / ");
if (field->sign && isDigit(value))
- value.append("+").append(value);
+ value = std::string("+").append(value);
const std::string format = translator->getStr(field->description);
effect.append(strprintf(format.c_str(),
value.c_str()));