Маленький фикс

This commit is contained in:
Danil Malin 2022-11-24 20:18:22 +04:00
parent eb23baf490
commit d83609741b

View File

@ -46,7 +46,7 @@ namespace WarmlyLocomotive
{ {
if (position < 0 || position > Count || _maxCount == Count) if (position < 0 || position > Count || _maxCount == Count)
{ {
throw new StorageOverflowException(Count); throw new StorageOverflowException(_maxCount);
} }
_places.Insert(position, locomotive); _places.Insert(position, locomotive);
return position; return position;