Browse Source

Fix version increment in zero-sized clear

Brian Fiete 3 years ago
parent
commit
d2ed047ebc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      BeefLibs/corlib/src/Collections/List.bf

+ 2 - 2
BeefLibs/corlib/src/Collections/List.bf

@@ -429,10 +429,10 @@ namespace System.Collections
 			if (mSize > 0)
 			{
 				mSize = 0;
-			}
 #if VERSION_LIST
-			mVersion++;
+				mVersion++;
 #endif
+			}
 		}
 
 		/*public static void DeleteItemsAndClear<T>(List<T> list) where T : delete