diff options
-rw-r--r-- | engines/zvision/render_table.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/zvision/render_table.cpp b/engines/zvision/render_table.cpp index ee3628299a..55285b45e6 100644 --- a/engines/zvision/render_table.cpp +++ b/engines/zvision/render_table.cpp @@ -62,9 +62,9 @@ void RenderTable::setRenderState(RenderState newState) { const Common::Point RenderTable::convertWarpedCoordToFlatCoord(const Common::Point &point) { // If we're outside the range of the RenderTable, no warping is happening. Return the maximum image coords - if (point.x >= _numColumns || point.y >= _numRows) { - int16 x = CLIP<int16>(point.x, 0, _numColumns); - int16 y = CLIP<int16>(point.y, 0, _numRows); + if (point.x >= (int16)_numColumns || point.y >= (int16)_numRows || point.x < 0 || point.y , 0) { + int16 x = CLIP<int16>(point.x, 0, (int16)_numColumns); + int16 y = CLIP<int16>(point.y, 0, (int16)_numRows); return Common::Point(x, y); } |