aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorTravis Howell2002-11-05 02:17:38 +0000
committerTravis Howell2002-11-05 02:17:38 +0000
commit0efd6b1cc27c53ccd75c3bdaf0f3cd81eb41292e (patch)
tree5825d2ac3a0adf9d61f810c588824eb2f1c79b78 /simon
parent9a97006a55b28ab0febccbe4c02edcd2358a5786 (diff)
downloadscummvm-rg350-0efd6b1cc27c53ccd75c3bdaf0f3cd81eb41292e.tar.gz
scummvm-rg350-0efd6b1cc27c53ccd75c3bdaf0f3cd81eb41292e.tar.bz2
scummvm-rg350-0efd6b1cc27c53ccd75c3bdaf0f3cd81eb41292e.zip
Fix broken simon games
svn-id: r5405
Diffstat (limited to 'simon')
-rw-r--r--simon/simon.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 7571608aed..2c7241f4b5 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -4711,11 +4711,13 @@ void SimonState::initSound()
if (_voice_type != FORMAT_NONE) {
#ifdef USE_MAD
- if (_voice_type == FORMAT_MP3)
+ if (_voice_type == FORMAT_MP3) {
_voice_offsets = (uint32 *)malloc((gss->NUM_VOICE_RESOURCES + 1) * sizeof(uint32));
- else
-#else
+ } else {
+#endif
_voice_offsets = (uint32 *)malloc(gss->NUM_VOICE_RESOURCES * sizeof(uint32));
+#ifdef USE_MAD
+ }
#endif
if (_voice_offsets == NULL)
error("Out of memory for voice offsets");
@@ -4754,11 +4756,13 @@ void SimonState::initSound()
if (_effects_file->isOpen() == true)
{
#ifdef USE_MAD
- if (_effects_type == FORMAT_MP3)
+ if (_effects_type == FORMAT_MP3) {
_effects_offsets = (uint32 *)malloc((gss->NUM_EFFECTS_RESOURCES + 1) * sizeof(uint32));
- else
-#else
+ } else {
+#endif
_effects_offsets = (uint32 *)malloc(gss->NUM_EFFECTS_RESOURCES * sizeof(uint32));
+#ifdef USE_MAD
+ }
#endif
if (_effects_offsets == NULL)
error("Out of memory for effects offsets");