[Scummvm-cvs-logs] SF.net SVN: scummvm:[39420] scummvm/trunk/engines/kyra/resource_intern.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Mar 15 15:48:08 CET 2009
Revision: 39420
http://scummvm.svn.sourceforge.net/scummvm/?rev=39420&view=rev
Author: lordhoto
Date: 2009-03-15 14:48:08 +0000 (Sun, 15 Mar 2009)
Log Message:
-----------
Fix for loading Kyra1 Amiga PAK files.
Modified Paths:
--------------
scummvm/trunk/engines/kyra/resource_intern.cpp
Modified: scummvm/trunk/engines/kyra/resource_intern.cpp
===================================================================
--- scummvm/trunk/engines/kyra/resource_intern.cpp 2009-03-15 14:17:01 UTC (rev 39419)
+++ scummvm/trunk/engines/kyra/resource_intern.cpp 2009-03-15 14:48:08 UTC (rev 39420)
@@ -143,8 +143,8 @@
}
bool ResLoaderPak::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const {
- int32 filesize = stream.size();
- int32 offset = 0;
+ uint32 filesize = stream.size();
+ uint32 offset = 0;
bool switchEndian = false;
bool firstFile = true;
@@ -157,7 +157,7 @@
Common::String file;
while (!stream.eos()) {
// The start offset of a file should never be in the filelist
- if (offset < stream.pos() || offset > filesize)
+ if (offset < (uint32)stream.pos() || offset > filesize)
return false;
byte c = 0;
@@ -212,9 +212,9 @@
} // end of anonymous namespace
Common::Archive *ResLoaderPak::load(Common::SharedPtr<Common::ArchiveMember> memberFile, Common::SeekableReadStream &stream) const {
- int32 filesize = stream.size();
+ uint32 filesize = stream.size();
- int32 startoffset = 0, endoffset = 0;
+ uint32 startoffset = 0, endoffset = 0;
bool switchEndian = false;
bool firstFile = true;
@@ -229,7 +229,7 @@
Common::String file;
while (!stream.eos()) {
// The start offset of a file should never be in the filelist
- if (startoffset < stream.pos() || startoffset > filesize) {
+ if (startoffset < (uint32)stream.pos() || startoffset > filesize) {
warning("PAK file '%s' is corrupted", memberFile->getDisplayName().c_str());
return false;
}
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