Commit 59140d218a3f734a01422a75ff9e91476eac859f

Thomas de Grivel 2024-01-07T09:49:45

fix facts_clean

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/libc3/facts.c b/libc3/facts.c
index f3fce1f..0bfed5b 100644
--- a/libc3/facts.c
+++ b/libc3/facts.c
@@ -560,7 +560,7 @@ void facts_remove_all (s_facts *facts)
     f[i] = &item->data;
     i++;
   }
-  qsort(f, count, sizeof(f[0]), facts_compare_fact_id_reverse);
+  qsort(f, i, sizeof(f[0]), facts_compare_fact_id_reverse);
   j = 0;
   while (j < i) {
     facts_remove_fact(facts, f[j]);