diff --git a/BepuUtilities/Collections/LSBRadixSort.cs b/BepuUtilities/Collections/LSBRadixSort.cs index 83257534b..b1bc1c924 100644 --- a/BepuUtilities/Collections/LSBRadixSort.cs +++ b/BepuUtilities/Collections/LSBRadixSort.cs @@ -182,7 +182,7 @@ public static void Sort(ref Buffer inputKeys, ref Buffer in //Note that we require the scratch and input spans to contain the offset region. That's because the output could be either the scratch or the input spans. Debug.Assert( inputKeys.Length >= startIndex + count && inputValues.Length >= startIndex + count && - inputKeys.Length >= startIndex + count && inputValues.Length >= startIndex + count, + scratchKeys.Length >= startIndex + count && scratchValues.Length >= startIndex + count, "The spans must be able to hold the sort region."); #if DEBUG for (int i = startIndex; i < startIndex + count; ++i)