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:
Oystein Eftevaag 2006-03-19 07:54:30 +00:00
parent e636a25a33
commit d34d6b17df

View File

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