diff --git a/Packages/com.merlin.UdonSharp/Runtime/Libraries/Collections/List.cs b/Packages/com.merlin.UdonSharp/Runtime/Libraries/Collections/List.cs index 70b9d170..3bddda43 100644 --- a/Packages/com.merlin.UdonSharp/Runtime/Libraries/Collections/List.cs +++ b/Packages/com.merlin.UdonSharp/Runtime/Libraries/Collections/List.cs @@ -293,7 +293,7 @@ public void RemoveRange(int index, int count) int size = _size; T[] itemArr = _items; - if (index < 0 || index >= size) + if (index < 0 || index > size) { Debug.LogError($"Index out of range: {index}"); #pragma warning disable CS0251 @@ -483,4 +483,4 @@ public static List CreateFromHashSet(HashSet hashSet) return list; } } -} \ No newline at end of file +}