[Scummvm-cvs-logs] SF.net SVN: scummvm: [23489] scummvm/branches/branch-0-9-0

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Thu Jul 20 22:45:00 CEST 2006


Revision: 23489
          http://svn.sourceforge.net/scummvm/?rev=23489&view=rev
Author:   eriktorbjorn
Date:     2006-07-11 09:55:56 -0700 (Tue, 11 Jul 2006)

Log Message:
-----------
Backported possible fix for bug #1520629, "No Music in Simon1".

Modified Paths:
--------------
    scummvm/branches/branch-0-9-0/NEWS
    scummvm/branches/branch-0-9-0/engines/simon/midi.cpp

Modified: scummvm/branches/branch-0-9-0/NEWS
===================================================================
--- scummvm/branches/branch-0-9-0/NEWS	2006-07-11 16:51:10 UTC (rev 23488)
+++ scummvm/branches/branch-0-9-0/NEWS	2006-07-11 16:55:56 UTC (rev 23489)
@@ -15,7 +15,8 @@
    - Fixed FM-TOWNS version of Indy3 failing on Amiga port.
 
  Simon
-   - Improved support for international versions of the Feeble Files
+   - Improved support for international versions of the Feeble Files.
+   - Fixed undefined behaviour when loading music.
 
  Broken Sword 2
    - More robust handling of the optional startup.inf file.

Modified: scummvm/branches/branch-0-9-0/engines/simon/midi.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/engines/simon/midi.cpp	2006-07-11 16:51:10 UTC (rev 23488)
+++ scummvm/branches/branch-0-9-0/engines/simon/midi.cpp	2006-07-11 16:55:56 UTC (rev 23489)
@@ -479,14 +479,14 @@
 			printf("Expected MThd but found '%c%c%c%c' instead!\n", buf[0], buf[1], buf[2], buf[3]);
 			return;
 		}
-		in->seek(in->readUint32BE() + in->pos(), SEEK_SET);
+		in->seek(in->readUint32BE(), SEEK_CUR);
 
 		// Now skip all the MTrk blocks
 		while (true) {
 			in->read(buf, 4);
 			if (memcmp(buf, "MTrk", 4))
 				break;
-			in->seek(in->readUint32BE() + in->pos(), SEEK_SET);
+			in->seek(in->readUint32BE(), SEEK_CUR);
 		}
 
 		uint32 pos2 = in->pos() - 4;






More information about the Scummvm-git-logs mailing list