From 292f1a26e3794e35c6d4dde5eee927085faf03fd Mon Sep 17 00:00:00 2001 From: John Date: Thu, 19 Oct 2017 19:27:51 +0800 Subject: [PATCH] [csharp] Fix ExposedList.Resize --- spine-csharp/src/ExposedList.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spine-csharp/src/ExposedList.cs b/spine-csharp/src/ExposedList.cs index ba3bfbdce..6943448da 100644 --- a/spine-csharp/src/ExposedList.cs +++ b/spine-csharp/src/ExposedList.cs @@ -1,4 +1,4 @@ -// +// // System.Collections.Generic.List // // Authors: @@ -97,9 +97,9 @@ namespace Spine { // var newItems = new T[newSize]; // Array.Copy(oldItems, newItems, Count); // Items = newItems; - } else if (newSize > itemsLength) { + } else if (newSize < itemsLength) { // Allow nulling of T reference type to allow GC. - for (int i = Count; i < itemsLength; i++) + for (int i = newSize; i < itemsLength; i++) oldItems[i] = default(T); } Count = newSize;