diff options
author | Max Horn | 2002-10-21 22:06:06 +0000 |
---|---|---|
committer | Max Horn | 2002-10-21 22:06:06 +0000 |
commit | 0c3f23bdfb780d8969cf992a5b67502f8d8d167e (patch) | |
tree | fc3e78406aa6ef8ed210a3bccadb1278bf56cf95 | |
parent | d58c7d43f0c6ce9cb1e708521120700c90046559 (diff) | |
download | scummvm-rg350-0c3f23bdfb780d8969cf992a5b67502f8d8d167e.tar.gz scummvm-rg350-0c3f23bdfb780d8969cf992a5b67502f8d8d167e.tar.bz2 scummvm-rg350-0c3f23bdfb780d8969cf992a5b67502f8d8d167e.zip |
don't crash if no voice file is present; also added a FIXME
svn-id: r5223
-rw-r--r-- | simon/simon.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index 65469215ad..40951a4ed1 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -4743,6 +4743,9 @@ struct VocBlockHeader { void SimonState::playVoice(uint voice) { + if (_voice_offsets == NULL) + return; + _mixer->stop(_voice_sound); _voice_file->seek(_voice_offsets[voice], SEEK_SET); @@ -4819,6 +4822,8 @@ void SimonState::playSound(uint sound) } _effects_file->read(&size, 4); + // FIXME - do we really want to read a block of 4 bytes, ignoring endian issues? + printf("FOO %08x 7 %d \n", size, size & 0xffffff); size = size & 0xffffff; _effects_file->seek(-1, SEEK_CUR); _effects_file->read(&voc_block_hdr, sizeof(voc_block_hdr)); |