diff options
author | Max Horn | 2003-04-30 13:23:31 +0000 |
---|---|---|
committer | Max Horn | 2003-04-30 13:23:31 +0000 |
commit | 2b74abd2c900d1a8bfd6c15829397503d9439849 (patch) | |
tree | be0e1c3845c90a7e66fffc6b763b964066621ebb /scumm/resource.cpp | |
parent | 30e3a8161857260e75c84e4a54cf0849afa10dfd (diff) | |
download | scummvm-rg350-2b74abd2c900d1a8bfd6c15829397503d9439849.tar.gz scummvm-rg350-2b74abd2c900d1a8bfd6c15829397503d9439849.tar.bz2 scummvm-rg350-2b74abd2c900d1a8bfd6c15829397503d9439849.zip |
PalmOS changes
svn-id: r7224
Diffstat (limited to 'scumm/resource.cpp')
-rw-r--r-- | scumm/resource.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 657b1cc34f..191b5b79df 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -550,7 +550,7 @@ void Scumm::nukeCharset(int i) { } void Scumm::ensureResourceLoaded(int type, int i) { - void *addr; + void *addr = NULL; debug(9, "ensureResourceLoaded(%s,%d)", resTypeFromId(type), i); @@ -561,7 +561,9 @@ void Scumm::ensureResourceLoaded(int type, int i) { if (i == 0) return; - addr = res.address[type][i]; + if (i <= res.num[type]) + addr = res.address[type][i]; + if (addr) return; @@ -1001,7 +1003,7 @@ int Scumm::readSoundResourceSmallHeader(int type, int idx) { ptr = createResource(type, idx, best_size); _fileHandle.read(ptr, best_size); - ticks = READ_BE_UINT16(ptr + 9); + ticks = READ_BE_UINT16_UNALIGNED(ptr + 9); size = best_size; if (size < 0x98) { // FIXME: OLD256 music file w/o instruments |