aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/imuse_digi
diff options
context:
space:
mode:
authorTorbjörn Andersson2008-01-15 21:56:53 +0000
committerTorbjörn Andersson2008-01-15 21:56:53 +0000
commitfe12cf8096ccb6338cdca7170e926c98a7149e92 (patch)
tree5a26388a7f25f1005408224009eb61ebf6a9b990 /engines/scumm/imuse_digi
parent08f135745186a7080ddc1b1e7fafed92ce92b3e0 (diff)
downloadscummvm-rg350-fe12cf8096ccb6338cdca7170e926c98a7149e92.tar.gz
scummvm-rg350-fe12cf8096ccb6338cdca7170e926c98a7149e92.tar.bz2
scummvm-rg350-fe12cf8096ccb6338cdca7170e926c98a7149e92.zip
Fixed bad memory access. (Wrong index variable when reading sound->marker[].)
svn-id: r30506
Diffstat (limited to 'engines/scumm/imuse_digi')
-rw-r--r--engines/scumm/imuse_digi/dimuse_sndmgr.cpp8
1 files changed, 4 insertions, 4 deletions
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;