summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-19 16:28:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-19 16:28:01 +0300
commitc4acdd1997b5bdc7b70e52ea90354ee65f15360a (patch)
treeaaa1639506c558cb9392014cd53b6f9086e69a17 /src/gui
parent9b553ed2102e12dd1e523cd9d09d3913c0f09cc5 (diff)
downloadmv-c4acdd1997b5bdc7b70e52ea90354ee65f15360a.tar.gz
mv-c4acdd1997b5bdc7b70e52ea90354ee65f15360a.tar.bz2
mv-c4acdd1997b5bdc7b70e52ea90354ee65f15360a.tar.xz
mv-c4acdd1997b5bdc7b70e52ea90354ee65f15360a.zip
Fix outfits loading.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/outfitwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 277ef904a..f4767c33c 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -142,10 +142,10 @@ void OutfitWindow::load(bool oldConfig)
std::string buf;
std::stringstream ss(outfit);
- std::vector<unsigned char> tokens;
+ std::vector<int> tokens;
while (ss >> buf)
- tokens.push_back(static_cast<unsigned char>(atoi(buf.c_str())));
+ tokens.push_back(atoi(buf.c_str()));
for (int i = 0; i < static_cast<int>(tokens.size())
&& i < OUTFIT_ITEM_COUNT; i++)
@@ -159,13 +159,14 @@ void OutfitWindow::load(bool oldConfig)
tokens.clear();
+ std::vector<unsigned char> tokens2;
while (ss2 >> buf)
- tokens.push_back(static_cast<unsigned char>(atoi(buf.c_str())));
+ tokens2.push_back(static_cast<unsigned char>(atoi(buf.c_str())));
- for (int i = 0; i < static_cast<int>(tokens.size())
+ for (int i = 0; i < static_cast<int>(tokens2.size())
&& i < OUTFIT_ITEM_COUNT; i++)
{
- mItemColors[o][i] = tokens[i];
+ mItemColors[o][i] = tokens2[i];
}
mItemsUnequip[o] = cfg->getValueBool("OutfitUnequip" + toString(o),