summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-20 18:05:26 -0700
committerIra Rice <irarice@gmail.com>2009-01-20 18:05:26 -0700
commitc6d75d9aad1775e60cc63516e844cf54623a3974 (patch)
treebc704b0beb8bff0e8579034ab30c69c50dec721e /src/resources/itemdb.cpp
parent36bd28ec6bfcf1e15fdf4378ce7a5687cad604bd (diff)
downloadmana-c6d75d9aad1775e60cc63516e844cf54623a3974.tar.gz
mana-c6d75d9aad1775e60cc63516e844cf54623a3974.tar.bz2
mana-c6d75d9aad1775e60cc63516e844cf54623a3974.tar.xz
mana-c6d75d9aad1775e60cc63516e844cf54623a3974.zip
Added the ability to parse multiple item links, as well as removing
extra spaces before or after the [] tags. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r--src/resources/itemdb.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index d27ad23d..cb9fadab 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -125,6 +125,14 @@ void ItemDB::load()
if (itr == mNamedItemInfos.end())
{
std::string temp = name;
+ while (temp[0] == ' ')
+ {
+ temp = temp.substr(1, temp.size());
+ }
+ while (temp[temp.size()] == ' ')
+ {
+ temp = temp.substr(0, temp.size() - 1);
+ }
for (unsigned int i = 0; i < temp.size(); i++)
{