LibC: Don't compare equal elements in qsort

This seemed to break supertuxkart which returned `less` in this case
This commit is contained in:
2026-05-20 05:54:45 +03:00
parent e9d6431728
commit 45e55d8907

View File

@@ -809,7 +809,7 @@ static qsort_pair qsort_partition(uint8_t* pbegin, uint8_t* pend, size_t width,
while (eq < gt) while (eq < gt)
{ {
const int comp = compar(eq, pivot); const int comp = (eq == pivot) ? 0 : compar(eq, pivot);
if (comp < 0) if (comp < 0)
{ {