Merged changeset 948:923323444178 from default branch: valgrind sorting fix.

This commit is contained in:
Ryan C. Gordon 2009-02-28 01:37:57 -05:00
parent ab4e94c49e
commit 42eb0768d5
1 changed files with 2 additions and 1 deletions

View File

@ -214,7 +214,8 @@ static void __PHYSFS_quick_sort(void *a, PHYSFS_uint32 lo, PHYSFS_uint32 hi,
break;
swapfn(a, i, j);
} /* while */
swapfn(a, i, hi-1);
if (i != (hi-1))
swapfn(a, i, hi-1);
__PHYSFS_quick_sort(a, lo, j, cmpfn, swapfn);
__PHYSFS_quick_sort(a, i+1, hi, cmpfn, swapfn);
} /* else */