libluna: Do not sort empty arrays; avoids a segfault
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-06-03 11:55:46 +02:00
parent 1090815c8d
commit fd62de6474
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -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);
}