mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
CRAB: Fix bug where start.x could be less than 0
This commit is contained in:
1 parent
883e467c2d
commit
f2cc4568f4
1 file changed
+3
@@ -155,6 +155,9 @@ void TileSetGroup::ForceDraw(MapLayer &layer, const Rect &camera, const Vector2i
|
||||
start.x = player_pos.y / tile_size.y;
|
||||
start.y = player_pos.x / tile_size.x;
|
||||
|
||||
if(start.x < 0 || start.y < 0)
|
||||
return;
|
||||
|
||||
// The row and column we end drawing at
|
||||
finish.x = (player_pos.y + player_pos.h) / tile_size.y + 1;
|
||||
finish.y = (player_pos.x + player_pos.w) / tile_size.x + 1;
|
||||
|
||||
Reference in new issue
Block a user