Stefan Oberhumer : ntdll: qsort: Comparator must not get the same pointer.
Alexandre Julliard
julliard at winehq.org
Tue Oct 5 12:03:07 CDT 2010
Module: wine
Branch: master
Commit: c8fb366eb007c6fbed724012700d6edd21b03764
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8fb366eb007c6fbed724012700d6edd21b03764
Author: Stefan Oberhumer <stefan at obssys.com>
Date: Tue Oct 5 00:03:05 2010 +0200
ntdll: qsort: Comparator must not get the same pointer.
---
dlls/ntdll/misc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/misc.c b/dlls/ntdll/misc.c
index 9291909..7a939c2 100644
--- a/dlls/ntdll/misc.c
+++ b/dlls/ntdll/misc.c
@@ -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 {
More information about the wine-cvs
mailing list