2
0
Brian Fiete 5 жил өмнө
parent
commit
73e260c1d5

+ 13 - 0
BeefLibs/corlib/src/Collections/List.bf

@@ -152,6 +152,19 @@ namespace System.Collections
 			{
 				return mSize;
 			}
+
+			set
+			{
+				if (value <= mSize)
+				{
+					mSize = (.)value;
+				}
+				else
+				{
+					int addSize = value - mSize;
+					Internal.MemSet(GrowUnitialized(addSize), 0, addSize * strideof(T));
+				}
+			}
 		}
 
 		public bool IsEmpty