* Fix but in ZQuest, where gameString was being improperly assigned

This commit is contained in:
Phillip Stephens 2014-04-20 04:51:38 -07:00
parent 6c0115a23d
commit 0d0da95200
1 changed files with 2 additions and 2 deletions

View File

@ -62,15 +62,15 @@ ZQuestFile *ZQuestFileReader::read()
if (version >= ZQUEST_VERSION_CHECK(2, 0, 0)) if (version >= ZQUEST_VERSION_CHECK(2, 0, 0))
{ {
gameString = ((const char*)base::readBytes(0x0A), 0x0A); gameString = std::string((const char*)base::readBytes(0x0A), 0x0A);
for (size_t i = 0; i < ZQuestFile::gameStringList().size(); i++) for (size_t i = 0; i < ZQuestFile::gameStringList().size(); i++)
{ {
if (!ZQuestFile::gameStringList().at(i).substr(0, 0x0A).compare(gameString)) if (!ZQuestFile::gameStringList().at(i).substr(0, 0x0A).compare(gameString))
{ {
gameString = ZQuestFile::gameStringList().at(i); gameString = ZQuestFile::gameStringList().at(i);
game = (ZQuestFile::Game)i;
break; break;
} }
} }
BOM = base::readUint16(); BOM = base::readUint16();
checksum = base::readUint32(); checksum = base::readUint32();