From eb48bafca80a0a749fe5ee1ff661c42bdd3f2542 Mon Sep 17 00:00:00 2001 From: tyxz0 Date: Thu, 25 Apr 2024 20:25:22 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=B2=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B5=20=D0=B2?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF=D0=BE=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CollectionGenericObjects/MassiveGenericObjects.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs b/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs index 16ceba5..614f73c 100644 --- a/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/DoubleDeckerBus/DoubleDeckerBus/CollectionGenericObjects/MassiveGenericObjects.cs @@ -75,12 +75,12 @@ public class MassiveGenericObjects : ICollectionGenericObjects } while (copy_of_position > 0) { - if (_collection[position] == null) + if (_collection[copy_of_position] == null) { - _collection[position] = obj; - return position; + _collection[copy_of_position] = obj; + return copy_of_position; } - position--; + copy_of_position--; } return -1;