Modified ZipArchive::createReadStreamForMember to check whether the zip archive contains a file with the given name

svn-id: r38786
This commit is contained in:
Max Horn 2009-02-22 16:27:48 +00:00
parent 8fb7fd0681
commit c397b37bfb

View File

@ -1432,7 +1432,8 @@ Common::SeekableReadStream *ZipArchive::createReadStreamForMember(const Common::
if (!_zipFile)
return 0;
unzLocateFile(_zipFile, name.c_str(), 2);
if (unzLocateFile(_zipFile, name.c_str(), 2) != UNZ_OK)
return 0;
unz_file_info fileInfo;
unzOpenCurrentFile(_zipFile);