From 97ff115e7d8d53e1ef3a8cc5c0fb60693a13d11e Mon Sep 17 00:00:00 2001 From: James Brown Date: Sat, 18 Jan 2003 15:54:38 +0000 Subject: Fix shadowed variable in debugger, change bundle compression tables to be dynamic svn-id: r6499 --- scumm/bundle.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scumm/bundle.cpp') diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp index 9d8fc0793c..3723f6309f 100644 --- a/scumm/bundle.cpp +++ b/scumm/bundle.cpp @@ -260,7 +260,10 @@ int32 Bundle::decompressVoiceSampleByIndex(int32 index, byte *comp_final, int32 return 0; } - assert(num <= 50); + if (_compVoiceTable) + free(_compVoiceTable); + + _compVoiceTable = (CompTable*)malloc(sizeof(CompTable) * num); for (i = 0; i < num; i++) { _compVoiceTable[i].offset = _voiceFile.readUint32BE(); _compVoiceTable[i].size = _voiceFile.readUint32BE(); @@ -315,7 +318,10 @@ int32 Bundle::decompressMusicSampleByIndex(int32 index, int32 number, byte *comp return 0; } - assert(num <= 3361); + if (_compMusicTable) + free(_compMusicTable); + _compMusicTable = (CompTable*)malloc(sizeof(CompTable) * num); + for (i = 0; i < num; i++) { _compMusicTable[i].offset = _musicFile.readUint32BE(); _compMusicTable[i].size = _musicFile.readUint32BE(); -- cgit v1.2.3