diff options
author | Max Horn | 2006-01-29 17:47:38 +0000 |
---|---|---|
committer | Max Horn | 2006-01-29 17:47:38 +0000 |
commit | 2ce2bac35c51ed0854c644874696993e382e5d5e (patch) | |
tree | eda9f9b4a7a7edfce84df9bc3df7cb38fd0b04f5 /scumm | |
parent | 83d6bd606c923751062a7694159e0e796a580bcc (diff) | |
download | scummvm-rg350-2ce2bac35c51ed0854c644874696993e382e5d5e.tar.gz scummvm-rg350-2ce2bac35c51ed0854c644874696993e382e5d5e.tar.bz2 scummvm-rg350-2ce2bac35c51ed0854c644874696993e382e5d5e.zip |
cleanup
svn-id: r20300
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/sound.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 588e204c7a..f3a6168de3 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -2187,20 +2187,17 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) { // + some default instruments byte *ptr; if (_features & GF_OLD_BUNDLE) { - ptr = (byte *) calloc(ad_size - 4, 1); + ad_size -= 4; _fileHandle->seek(ad_offs + 4, SEEK_SET); - _fileHandle->read(ptr, ad_size - 4); - convertADResource(type, idx, ptr, ad_size - 4); - free(ptr); - return 1; } else { - ptr = (byte *) calloc(ad_size - 6, 1); + ad_size -= 6; _fileHandle->seek(ad_offs, SEEK_SET); - _fileHandle->read(ptr, ad_size - 6); - convertADResource(type, idx, ptr, ad_size - 6); - free(ptr); - return 1; } + ptr = (byte *) calloc(ad_size, 1); + _fileHandle->read(ptr, ad_size); + convertADResource(type, idx, ptr, ad_size); + free(ptr); + return 1; } else if ((_musicType == MDT_PCSPK) && wa_offs != 0) { if (_features & GF_OLD_BUNDLE) { _fileHandle->seek(wa_offs, SEEK_SET); |