aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-12-11 08:18:51 +0000
committerTorbjörn Andersson2003-12-11 08:18:51 +0000
commit813e8fbdab4af97e484a710e2a9abdb4054e47b1 (patch)
treee0784a056d2a9a389c6ce6e10d7c359267f9f692
parent110d0b08da7228558ee393c9f00dcb5e09634d2e (diff)
downloadscummvm-rg350-813e8fbdab4af97e484a710e2a9abdb4054e47b1.tar.gz
scummvm-rg350-813e8fbdab4af97e484a710e2a9abdb4054e47b1.tar.bz2
scummvm-rg350-813e8fbdab4af97e484a710e2a9abdb4054e47b1.zip
Emergency bugfixes:
Initialise _cd.playing to false. Otherwise ScummVM may create a savegame where a CD track appears to be playing, but everything about it is undefined, causing ScummVM to crash when loading it. Initialise _track_info[] with NULLs, otherwise ScummVM crashes for me when I start the CD version of MI1. There's probably a lot more that *should* be properly initialised, but this seems to take care of the most serious issues, and is all I have the time to do now anyway. svn-id: r11573
-rw-r--r--sound/audiocd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp
index ddd4a9d006..d714efd8e9 100644
--- a/sound/audiocd.cpp
+++ b/sound/audiocd.cpp
@@ -31,6 +31,8 @@
AudioCDManager::AudioCDManager() {
_current_cache = 0;
+ _cd.playing = false;
+ memset(_track_info, 0, sizeof(_track_info));
}
void AudioCDManager::play(int track, int numLoops, int startFrame, int duration) {