diff options
| author | Oliver Kiehl | 2002-11-08 13:38:25 +0000 |
|---|---|---|
| committer | Oliver Kiehl | 2002-11-08 13:38:25 +0000 |
| commit | 70f3aff2c8c9e01f65b98d9c676dfb021fa4dc80 (patch) | |
| tree | 78a4b60bb2d3ebbec117379dfc83084a3aa74abe /simon | |
| parent | 163b1eeeb52a78bdb7efd7da46cdd8ae104fcf79 (diff) | |
| download | scummvm-rg350-70f3aff2c8c9e01f65b98d9c676dfb021fa4dc80.tar.gz scummvm-rg350-70f3aff2c8c9e01f65b98d9c676dfb021fa4dc80.tar.bz2 scummvm-rg350-70f3aff2c8c9e01f65b98d9c676dfb021fa4dc80.zip | |
last fix didn't work properly
svn-id: r5466
Diffstat (limited to 'simon')
| -rw-r--r-- | simon/simon.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp index c777827b00..c5948d709a 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -3276,6 +3276,7 @@ void SimonState::showmessage_helper_2() void SimonState::readSfxFile(const char *filename) { + uint num; if (_game == GAME_SIMON1WIN) { /* simon 1 win */ uint32 size; @@ -3294,6 +3295,8 @@ void SimonState::readSfxFile(const char *filename) _effects_file->seek(4, SEEK_SET); _effects_file->read(&size, sizeof(uint32)); + num = size / sizeof(uint32); + _effects_offsets = (uint32 *)malloc(size); _effects_file->seek(0, SEEK_SET); @@ -3305,7 +3308,6 @@ void SimonState::readSfxFile(const char *filename) int set; uint32 offs; - int num; int i; vc_29_stop_all_sounds(); @@ -3332,7 +3334,7 @@ void SimonState::readSfxFile(const char *filename) #if defined(SCUMM_BIG_ENDIAN) uint r; if (_effects_offsets) { - for (r = 0; r < gss->NUM_EFFECTS_RESOURCES; r++) + for (r = 0; r <= num; r++) _effects_offsets[r] = READ_LE_UINT32(&_effects_offsets[r]); } #endif |
