proper fix for getPathToDestBox

svn-id: r7721
This commit is contained in:
Max Horn 2003-05-20 12:54:04 +00:00
parent 46abb7998f
commit c8169afe2b

View File

@ -571,7 +571,13 @@ int Scumm::getPathToDestBox(byte from, byte to) {
if (from == to)
return to;
assert(from < numOfBoxes || from == Actor::INVALID_BOX);
if (to == Actor::INVALID_BOX)
return -1;
if (from == Actor::INVALID_BOX)
return to;
assert(from < numOfBoxes);
assert(to < numOfBoxes);
boxm = getBoxMatrixBaseAddr();