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:
Max Horn 2007-02-23 02:35:01 +00:00
parent a63a71eb78
commit f1f28b61a9

View File

@ -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;