mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
SCI32: Fix segfault when SCI3 vocab isn't found
Seen when attempting to detect and/or run the Shivers 2 demo. Closes gh-1106.
This commit is contained in:
parent
6e2c702bad
commit
0c26da90bb
@ -2918,6 +2918,9 @@ Common::String ResourceManager::findSierraGameId(const bool isBE) {
|
||||
heap = findResource(ResourceId(kResourceTypeScript, 0), false);
|
||||
|
||||
Resource *vocab = findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SELECTORS), false);
|
||||
if (!vocab)
|
||||
return "";
|
||||
|
||||
const uint16 numSelectors = isBE ? vocab->getUint16BEAt(0) : vocab->getUint16LEAt(0);
|
||||
for (uint16 i = 0; i < numSelectors; ++i) {
|
||||
uint16 selectorOffset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user