diff options
-rw-r--r-- | lib/sort.c | 2 |
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, } /* sort */ - for (i = n - size; i >= 0; i -= size) { + for (i = n - size; i > 0; i -= size) { swap(base, base + i, size); for (r = 0; r * 2 + size < i; r = c) { c = r * 2 + size; |