Added another check if PAK file is corrupted.

svn-id: r30833
This commit is contained in:
Johannes Schickel 2008-02-09 14:43:43 +00:00
parent 166698d29d
commit 40b19365be

View File

@ -415,6 +415,12 @@ bool ResLoaderPak::loadFile(const Common::String &filename, Common::SeekableRead
}
while (!stream.eos()) {
// The start offset of a file should never be in the filelist
if (startoffset < stream.pos()) {
warning("PAK file '%s' is corrupted", filename.c_str());
return false;
}
Common::String file = "";
byte c = 0;