mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
LILLIPUT: Add safeguard in homeInPathFinding
This commit is contained in:
parent
2f00d52a23
commit
7af31d6614
@ -1389,7 +1389,10 @@ void LilliputEngine::homeInPathFinding(int index) {
|
||||
|
||||
if (enclosureSrc == -1) {
|
||||
int tmpVal = checkOuterEnclosure(_characterTargetPos[index]);
|
||||
_characterSubTargetPos[index] = _portalPos[tmpVal];
|
||||
if (tmpVal == -1)
|
||||
warning("homeInPathFinding: Unexpected negative index");
|
||||
else
|
||||
_characterSubTargetPos[index] = _portalPos[tmpVal];
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user