[Scummvm-git-logs] scummvm master -> c0461b789e2710089706727f6ceb4cf788f9e4d0

bluegr bluegr at gmail.com
Fri Feb 19 21:18:19 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c0461b789e SCUMM: Fix bad offset on game loading


Commit: c0461b789e2710089706727f6ceb4cf788f9e4d0
    https://github.com/scummvm/scummvm/commit/c0461b789e2710089706727f6ceb4cf788f9e4d0
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-02-19T23:18:16+02:00

Commit Message:
SCUMM: Fix bad offset on game loading

The iterator l was used inside the loop, which caused it to bail out
after 12 iterations instead of 16.

Amends 434d1f37f9398b6a7a1b08cd5464a1d5ecccdc41.

Changed paths:
    engines/scumm/imuse_digi/dimuse.cpp


diff --git a/engines/scumm/imuse_digi/dimuse.cpp b/engines/scumm/imuse_digi/dimuse.cpp
index e5b42d6079..d85348af4d 100644
--- a/engines/scumm/imuse_digi/dimuse.cpp
+++ b/engines/scumm/imuse_digi/dimuse.cpp
@@ -184,16 +184,16 @@ void IMuseDigital::saveLoadEarly(Common::Serializer &s) {
 
 			if (_vm->_game.id == GID_CMI) {
 				if (track->soundId / 1000 == 1) { // State
-					for (l = 0; _comiStateMusicTable[l].soundId != -1; l++) {
-						if ((_comiStateMusicTable[l].soundId == track->soundId)) {
-							track->loopShiftType = _comiStateMusicTable[l].shiftLoop;
+					for (int ll = 0; _comiStateMusicTable[ll].soundId != -1; ll++) {
+						if ((_comiStateMusicTable[ll].soundId == track->soundId)) {
+							track->loopShiftType = _comiStateMusicTable[ll].shiftLoop;
 							break;
 						}
 					}
 				} else if (track->soundId / 1000 == 2) { // Sequence
-					for (l = 0; _comiSeqMusicTable[l].soundId != -1; l++) {
-						if ((_comiSeqMusicTable[l].soundId == track->soundId)) {
-							track->loopShiftType = _comiSeqMusicTable[l].shiftLoop;
+					for (int ll = 0; _comiSeqMusicTable[ll].soundId != -1; ll++) {
+						if ((_comiSeqMusicTable[ll].soundId == track->soundId)) {
+							track->loopShiftType = _comiSeqMusicTable[ll].shiftLoop;
 							break; 
 						}
 					}




More information about the Scummvm-git-logs mailing list