mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
Fixes a potential problem in the pathfinder where an array could be accessed with a negative value in certain rooms
svn-id: r21378
This commit is contained in:
parent
e636a25a33
commit
d34d6b17df
@ -1455,6 +1455,10 @@ bool KyraEngine::lineIsPassable(int x, int y) {
|
||||
if (y > 137) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
}
|
||||
|
||||
int ypos = 8;
|
||||
if (_scaleMode) {
|
||||
@ -1464,8 +1468,6 @@ bool KyraEngine::lineIsPassable(int x, int y) {
|
||||
}
|
||||
|
||||
x -= (ypos >> 1);
|
||||
if (y < 0)
|
||||
y = 0;
|
||||
|
||||
int xpos = x;
|
||||
int xtemp = xpos + ypos - 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user