mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-20 16:59:06 +00:00
Modify ScummEngine::getResourceSize to assert if called on a missing resource, instead of trying to read from high memory
svn-id: r25806
This commit is contained in:
parent
a63a71eb78
commit
f1f28b61a9
@ -721,6 +721,7 @@ int ScummEngine::getResourceRoomNr(int type, int idx) {
|
||||
|
||||
int ScummEngine::getResourceSize(int type, int idx) {
|
||||
byte *ptr = getResourceAddress(type, idx);
|
||||
assert(ptr);
|
||||
MemBlkHeader *hdr = (MemBlkHeader *)(ptr - sizeof(MemBlkHeader));
|
||||
|
||||
return hdr->size;
|
||||
|
Loading…
Reference in New Issue
Block a user