physfs.c
branchstable-1.0
changeset 949 8badfbbb3b27
parent 900 c5172fa2c5e6
child 1288 2f4ad6a37f2e
--- a/physfs.c	Thu Apr 03 05:07:35 2008 +0000
+++ b/physfs.c	Sat Feb 28 01:37:57 2009 -0500
@@ -214,7 +214,8 @@
                 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 */