From fe12cf8096ccb6338cdca7170e926c98a7149e92 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 15 Jan 2008 21:56:53 +0000 Subject: Fixed bad memory access. (Wrong index variable when reading sound->marker[].) svn-id: r30506 --- engines/scumm/imuse_digi/dimuse_sndmgr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/scumm/imuse_digi') diff --git a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp index 16b14374a1..c9e1d71533 100644 --- a/engines/scumm/imuse_digi/dimuse_sndmgr.cpp +++ b/engines/scumm/imuse_digi/dimuse_sndmgr.cpp @@ -257,10 +257,10 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, SoundDesc *sound) { break; case MKID_BE('TEXT'): if (!scumm_stricmp((const char *)(ptr + 8), "exit")) { - sound->marker[curIndexRegion].pos = READ_BE_UINT32(ptr + 4); - sound->marker[curIndexRegion].length = strlen((const char *)(ptr + 8)) + 1; - sound->marker[curIndexRegion].ptr = new char[sound->marker[curIndexRegion].length]; - strcpy(sound->marker[curIndexRegion].ptr, (const char *)(ptr + 8)); + sound->marker[curIndexMarker].pos = READ_BE_UINT32(ptr + 4); + sound->marker[curIndexMarker].length = strlen((const char *)(ptr + 8)) + 1; + sound->marker[curIndexMarker].ptr = new char[sound->marker[curIndexMarker].length]; + strcpy(sound->marker[curIndexMarker].ptr, (const char *)(ptr + 8)); curIndexMarker++; } size = READ_BE_UINT32(ptr); ptr += size + 4; -- cgit v1.2.3