mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00
PEGASUS: Add sanity check on the NItm resource being present
This commit is contained in:
parent
582e464360
commit
749cdd6f44
@ -239,6 +239,9 @@ bool PegasusEngine::detectOpeningClosingDirectory() {
|
||||
void PegasusEngine::createItems() {
|
||||
Common::SeekableReadStream *res = _resFork->getResource(MKTAG('N', 'I', 't', 'm'), 0x80);
|
||||
|
||||
if (!res)
|
||||
error("Couldn't find neighborhood items resource");
|
||||
|
||||
uint16 entryCount = res->readUint16BE();
|
||||
|
||||
for (uint16 i = 0; i < entryCount; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user