[Scummvm-cvs-logs] SF.net SVN: scummvm:[44955] scummvm/trunk/engines/sword1/music.cpp

Hkz at users.sourceforge.net Hkz at users.sourceforge.net
Mon Oct 12 00:34:01 CEST 2009


Revision: 44955
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44955&view=rev
Author:   Hkz
Date:     2009-10-11 22:34:01 +0000 (Sun, 11 Oct 2009)

Log Message:
-----------
sword1: fix one gcc warning about comparison between signed and unsigned

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/music.cpp

Modified: scummvm/trunk/engines/sword1/music.cpp
===================================================================
--- scummvm/trunk/engines/sword1/music.cpp	2009-10-11 22:31:48 UTC (rev 44954)
+++ scummvm/trunk/engines/sword1/music.cpp	2009-10-11 22:34:01 UTC (rev 44955)
@@ -285,7 +285,9 @@
 
 	tableFile.close();
 
-	if ((size != 0) && (size != 0xffffffff) && ((offset + size) <= _file.size())) {
+	// Because of broken tunes.dat/tab in psx demo, also check that tune offset is
+	// not over file size
+	if ((size != 0) && (size != 0xffffffff) && ((int32)(offset + size) <= _file.size())) {
 		_file.seek(offset, SEEK_SET);
 		_audioSource = new Audio::VagStream(_file.readStream(size), loop);
 		fadeUp();


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