[Scummvm-cvs-logs] SF.net SVN: scummvm:[38786] scummvm/trunk/common/unzip.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Feb 22 17:27:48 CET 2009


Revision: 38786
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38786&view=rev
Author:   fingolfin
Date:     2009-02-22 16:27:48 +0000 (Sun, 22 Feb 2009)

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

Modified Paths:
--------------
    scummvm/trunk/common/unzip.cpp

Modified: scummvm/trunk/common/unzip.cpp
===================================================================
--- scummvm/trunk/common/unzip.cpp	2009-02-22 14:40:56 UTC (rev 38785)
+++ scummvm/trunk/common/unzip.cpp	2009-02-22 16:27:48 UTC (rev 38786)
@@ -1432,7 +1432,8 @@
 	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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list