diff options
author | lukaslw | 2014-07-22 00:52:39 +0200 |
---|---|---|
committer | lukaslw | 2014-07-22 00:52:39 +0200 |
commit | 0415b81811ad28c2e135b97b96545073b5d8f6b2 (patch) | |
tree | b3be8bd9b98ee18717729e549298383e043e9c03 /engines | |
parent | 705bac0ea53ec353d1997f7567141996141b37a8 (diff) | |
download | scummvm-rg350-0415b81811ad28c2e135b97b96545073b5d8f6b2.tar.gz scummvm-rg350-0415b81811ad28c2e135b97b96545073b5d8f6b2.tar.bz2 scummvm-rg350-0415b81811ad28c2e135b97b96545073b5d8f6b2.zip |
PRINCE: makePath() - crash fix, tracePath() - update
Diffstat (limited to 'engines')
-rw-r--r-- | engines/prince/prince.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index bf74393324..362a10654f 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -3737,7 +3737,6 @@ bool PrinceEngine::tracePath(int x1, int y1, int x2, int y2) { Graphics::drawLine(x, y, x2, y2, 0, &this->plotTraceLine, this); if (!_traceLineFlag) { - specialPlotInside(x2, y2); return true; } else if (_traceLineFlag == -1 && _traceLineLen >= 2) { byte *tempCorrds = bcad; @@ -4113,6 +4112,7 @@ byte *PrinceEngine::makePath(int destX, int destY) { choosenCoords = _coords3; choosenLength = pathLen2; } + if (choosenLength) { if (chosenCoordsBuf != nullptr) { int tempXBegin = READ_UINT16(chosenCoordsBuf); @@ -4125,11 +4125,11 @@ byte *PrinceEngine::makePath(int destX, int destY) { while (1) { cord = READ_UINT32(chosenCoordsBuf); WRITE_UINT32(tempCoordsBuf, cord); + tempCoordsBuf += 4; if (chosenCoordsBuf == choosenCoords) { break; } chosenCoordsBuf -= 4; - tempCoordsBuf += 4; } _coords = tempCoordsBuf; } else { |