Fixed bug in PAK link list code, now file links are correctly initialized.

svn-id: r35902
This commit is contained in:
Johannes Schickel 2009-01-18 16:49:03 +00:00
parent 98b3046c09
commit bf08c82054

View File

@ -295,7 +295,11 @@ Common::Archive *ResLoaderPak::load(Common::SharedPtr<Common::ArchiveMember> mem
for (uint j = 0; j < sources; ++j) {
Common::String dest = readString(stream);
files.push_back(*iter);
PlainArchive::InputEntry link = *iter;
link.name = dest;
files.push_back(link);
// Better safe than sorry, we update the 'iter' value, in case push_back invalidated it
iter = Common::find_if(files.begin(), files.end(), PlainArchiveListSearch(linksTo));
}