PI-12_Zaytsev_A.V_LabWork03_Base #6

Closed
tyxzo wants to merge 5 commits from lab3 into lab2
Showing only changes of commit eb48bafca8 - Show all commits

View File

@ -75,12 +75,12 @@ public class MassiveGenericObjects<T> : ICollectionGenericObjects<T>
}
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;