physfs.c
branchstable-1.0
changeset 1288 2f4ad6a37f2e
parent 949 8badfbbb3b27
equal deleted inserted replaced
1184:dedd6ba3868f 1288:2f4ad6a37f2e
   228 {
   228 {
   229     /*
   229     /*
   230      * Quicksort w/ Bubblesort fallback algorithm inspired by code from here:
   230      * Quicksort w/ Bubblesort fallback algorithm inspired by code from here:
   231      *   http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html
   231      *   http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html
   232      */
   232      */
   233     __PHYSFS_quick_sort(entries, 0, max - 1, cmpfn, swapfn);
   233     if (max > 0)
       
   234         __PHYSFS_quick_sort(entries, 0, max - 1, cmpfn, swapfn);
   234 } /* __PHYSFS_sort */
   235 } /* __PHYSFS_sort */
   235 
   236 
   236 
   237 
   237 
   238 
   238 #if (defined PHYSFS_PROFILING)
   239 #if (defined PHYSFS_PROFILING)