summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being.cpp2
-rw-r--r--src/resources/itemdb.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 61826089..8f00fd3c 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -203,7 +203,7 @@ void Being::takeDamage(Being *attacker, int amount, AttackType type)
color = &guiPalette->getColor(Palette::HIT_CRITICAL);
}
else if (!amount)
- {
+ {
if (attacker == player_node)
{
// This is intended to be the wrong direction to visually
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 2b94bd61..49913300 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -125,12 +125,12 @@ void ItemDB::load()
mItemInfos[id] = itemInfo;
if (!name.empty())
{
- NamedItemInfoIterator itr = mNamedItemInfos.find(name);
+ std::string temp = name;
+ toLower(trim(temp));
+
+ NamedItemInfoIterator itr = mNamedItemInfos.find(temp);
if (itr == mNamedItemInfos.end())
{
- std::string temp = name;
- toLower(trim(temp));
-
mNamedItemInfos[temp] = itemInfo;
}
else