[Scummvm-git-logs] scummvm master -> a4e2ac5eb34a3bee8b83bfe16007e1e3c7716bf4
AndywinXp
noreply at scummvm.org
Fri Apr 15 14:00:45 UTC 2022
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:
a4e2ac5eb3 SCUMM: DiMUSE: Fix tracksStopSound() behavior
Commit: a4e2ac5eb34a3bee8b83bfe16007e1e3c7716bf4
https://github.com/scummvm/scummvm/commit/a4e2ac5eb34a3bee8b83bfe16007e1e3c7716bf4
Author: Andrea Boscarino (andywinxp at gmail.com)
Date: 2022-04-15T16:00:42+02:00
Commit Message:
SCUMM: DiMUSE: Fix tracksStopSound() behavior
Without this fix, if we had a list of tracks A->B->C->D and we stopped C, we couldn't have stopped D because we reached the end of the list prematurely.
Changed paths:
engines/scumm/imuse_digi/dimuse_tracks.cpp
diff --git a/engines/scumm/imuse_digi/dimuse_tracks.cpp b/engines/scumm/imuse_digi/dimuse_tracks.cpp
index 7cc645bf094..c2694a3c9a8 100644
--- a/engines/scumm/imuse_digi/dimuse_tracks.cpp
+++ b/engines/scumm/imuse_digi/dimuse_tracks.cpp
@@ -235,13 +235,16 @@ int IMuseDigital::tracksStopSound(int soundId) {
if (!_trackList)
return -1;
- IMuseDigiTrack *track = _trackList;
- do {
- if (track->soundId == soundId) {
- tracksClear(track);
+ IMuseDigiTrack *nextTrack = _trackList;
+ IMuseDigiTrack *curTrack;
+
+ while (nextTrack) {
+ curTrack = nextTrack;
+ nextTrack = curTrack->next;
+ if (curTrack->soundId == soundId) {
+ tracksClear(curTrack);
}
- track = track->next;
- } while (track);
+ }
return 0;
}
More information about the Scummvm-git-logs
mailing list