From b0c44ab82b12b062ab0fd89140c4b96bee92849c Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 15 Aug 2020 11:47:01 -0400 Subject: fix off-by-one error --- src/stdlib/qsort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/stdlib/qsort.c b/src/stdlib/qsort.c index 535e8551..a6746947 100644 --- a/src/stdlib/qsort.c +++ b/src/stdlib/qsort.c @@ -10,7 +10,7 @@ void qsort(void * base, size_t nmemb, size_t size, int (*compar)(const void *, c size, compar, }; - __qsort(&qs, 0, nmemb); + __qsort(&qs, 0, nmemb - 1); } /*** -- cgit v1.2.1