From 6a441f2fe749091b9e267fe71934f4bfd6ffb371 Mon Sep 17 00:00:00 2001 From: Salikh Date: Wed, 29 Nov 2023 19:49:59 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/SetGeneric.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/AirBomber/SetGeneric.cs b/AirBomber/SetGeneric.cs index 1a592a7..57ee127 100644 --- a/AirBomber/SetGeneric.cs +++ b/AirBomber/SetGeneric.cs @@ -69,10 +69,8 @@ namespace ProjectBomber.Generics public bool Remove(int position) { /// Проверка позиции - if (position < 0 || position >= _places.Count) - return false; - /// Удаление объекта из массива, присвоив элементу массива значение null - _places[position] = null; + if ((position < 0) || (position > _maxCount)) return false; + _places.RemoveAt(position); return true; } ///