libluna: Do not sort empty arrays; avoids a segfault
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1090815c8d
commit
fd62de6474
@ -50,5 +50,6 @@ static void quicksort_impl(void* base, usize start, usize end, usize size, compa
|
||||
|
||||
void c_quicksort(void* base, usize nmemb, usize size, compar_t compar)
|
||||
{
|
||||
if (nmemb == 0) return;
|
||||
quicksort_impl(base, 0, nmemb - 1, size, compar);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user