bughunt in meanqs

This commit is contained in:
Richard Thier 2025-04-07 03:20:37 +02:00
parent 04705b5790
commit 22bb267000

View File

@ -4,6 +4,9 @@
#include <stdint.h>
/* Uncomment for debugging with if(someevent) raise(SIGINT); */
#include <signal.h>
/* Structure:
*
* - BASICS: Basic quicksort
@ -368,6 +371,10 @@ static inline int partition_with_pivotval(uint32_t array[], int low, int high, u
}
}
// TODO: Remove debug stuff
printf("array[%d]: %d <---> %d :array[%d] @ pivotval: %u\n", i, array[i], array[pivoti], pivoti, pivotval);
if(pivotval == 2147494598u) raise(SIGINT);
/* swap the pivot element into its place */
swapit(&array[i], &array[pivoti]);