Drawn maps: Fix off-by-one errors in land erasing code
authorWuzzy <Wuzzy2@mail.ru>
Sat, 15 Jun 2019 18:51:04 +0200
changeset 15178 490bd70dac6e
parent 15177 84e98f0f7f7b
child 15179 4744d7b78c75
Drawn maps: Fix off-by-one errors in land erasing code
hedgewars/uLandPainted.pas
--- a/hedgewars/uLandPainted.pas	Sat Jun 15 18:15:32 2019 +0200
+++ b/hedgewars/uLandPainted.pas	Sat Jun 15 18:51:04 2019 +0200
@@ -131,9 +131,9 @@
         end;
 
     if (topY > 0) then
-        EraseLandRectRaw(0, 0, LAND_WIDTH, topY - 1);
+        EraseLandRectRaw(0, 0, LAND_WIDTH, topY);
     if (leftX > 0) then
-        EraseLandRectRaw(0, topY, leftX - 1, LAND_HEIGHT - topY);
+        EraseLandRectRaw(0, topY, leftX, LAND_HEIGHT - topY);
     if (rightX < (LAND_WIDTH - 1)) then
         EraseLandRectRaw(rightX + 1, topY, LAND_WIDTH - (rightX + 1), LAND_HEIGHT - topY);
 end;