diff --git a/projects/mtg/src/DeckStats.cpp b/projects/mtg/src/DeckStats.cpp index 329ce3736..71fd9b24f 100644 --- a/projects/mtg/src/DeckStats.cpp +++ b/projects/mtg/src/DeckStats.cpp @@ -49,7 +49,20 @@ DeckStats::~DeckStats() DeckStat* DeckStats::getDeckStat(string opponentsFile) { map stats = masterDeckStats[currentDeck]; - map::iterator it = stats.find(opponentsFile); + //map::iterator it = stats.find(opponentsFile); + //this method can not find the opponentfile string + //stats string for first doesn't even act like a string, i was forced to pull it out of the + //iter to make the comparison. it->first.find( for example was not finding it even though i can + //see them in the debugger as matching strings + map::iterator it; + for (it = stats.begin(); it != stats.end(); ++it) + { + string deckStatName = it->first; + if(deckStatName.find(opponentsFile.c_str()) != string::npos) + { + break; + } + } if (it == stats.end()) { return NULL;