From 65eddefb53aaf9eb3cb5263cf24d2c454aad895b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=9F=D1=83=D1=82=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=BD?= Date: Tue, 4 Oct 2022 15:43:15 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs b/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs index 8b6209d..2ded9de 100644 --- a/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs +++ b/AirplaneWithRadar/AirplaneWithRadar/DrawingAirplane.cs @@ -59,7 +59,7 @@ namespace AirplaneWithRadar _pictureWidth = width; _pictureHeight = height; - if (x < 0 || y < 0 || width <= _airplaneWidth || height <= _airplaneHeight || x - _airplaneWidth < width || y - _airplaneHeight < height) + if (x < 0 || y < 0 || width <= _airplaneWidth || height <= _airplaneHeight || x + _airplaneWidth > width || y + _airplaneHeight > height) { _pictureHeight = null; _pictureWidth = null;