@ -182,8 +182,6 @@ void BSAFile::readHeader()
if(fs.offset + fs.fileSize > fsize)
fail("Archive contains offsets outside itself");
// Add the file name to the lookup
mLookup[fs.name()] = i;
}
mStringBuf.resize(endOfNameBuffer);
@ -191,6 +189,13 @@ void BSAFile::readHeader()
return left.offset < right.offset;
});
for (size_t i = 0; i < filenum; i++)
{
FileStruct& fs = mFiles[i];
mIsLoaded = true;