Fix problem in DPA_QuickSort where the sort order was inverted.
This commit is contained in:
parent
5394258a90
commit
3ff06f613e
|
@ -1305,8 +1305,8 @@ DPA_QuickSort (LPVOID *lpPtrs, INT l, INT r,
|
|||
j = r;
|
||||
v = lpPtrs[(int)(l+r)/2];
|
||||
do {
|
||||
while ((pfnCompare)(lpPtrs[i], v, lParam) < 0) i++;
|
||||
while ((pfnCompare)(lpPtrs[j], v, lParam) > 0) j--;
|
||||
while ((pfnCompare)(lpPtrs[i], v, lParam) > 0) i++;
|
||||
while ((pfnCompare)(lpPtrs[j], v, lParam) < 0) j--;
|
||||
if (i <= j)
|
||||
{
|
||||
t = lpPtrs[i];
|
||||
|
|
Loading…
Reference in New Issue