From 813e8fbdab4af97e484a710e2a9abdb4054e47b1 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 11 Dec 2003 08:18:51 +0000 Subject: 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 --- sound/audiocd.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound') 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) { -- cgit v1.2.3