Commit c8fb366e authored by Stefan Oberhumer's avatar Stefan Oberhumer Committed by Alexandre Julliard

ntdll: qsort: Comparator must not get the same pointer.

parent 38769ddf
......@@ -272,7 +272,7 @@ NTDLL_mergesort( void *arr, void *barr, size_t elemsize, int(__cdecl *compar)(co
/* i=left; j=right; */
for (k=left; i<=m && j>m; k++) {
if (compar(X(barr,i),X(barr,j))<=0) {
if (i==j || compar(X(barr,i),X(barr,j))<=0) {
memcpy(X(arr,k),X(barr,i),elemsize);
i++;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment