aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sort.c b/lib/sort.c
index 961567894d16..6abbaf3d5858 100644
--- a/lib/sort.c
+++ b/lib/sort.c
@@ -67,7 +67,7 @@ void sort(void *base, size_t num, size_t size,
67 } 67 }
68 68
69 /* sort */ 69 /* sort */
70 for (i = n - size; i >= 0; i -= size) { 70 for (i = n - size; i > 0; i -= size) {
71 swap(base, base + i, size); 71 swap(base, base + i, size);
72 for (r = 0; r * 2 + size < i; r = c) { 72 for (r = 0; r * 2 + size < i; r = c) {
73 c = r * 2 + size; 73 c = r * 2 + size;