fixed merge

This commit is contained in:
2026-08-21 02:30:57 -05:00
parent 3ecc85aecd
commit a0254bb750
+1 -1
View File
@@ -236,7 +236,7 @@ KekeArray *keke_array_merge(KekeArray *a, KekeArray *b) {
keke_array_set_len(c, 0); keke_array_set_len(c, 0);
void *s = malloc(a->type_size); void *s = malloc(a->type_size);
while(!!(a->len) && !!(b->len)) { while(!!(a->len) && !!(b->len)) {
if(memcmp(ARRAY_GET(a, a->len - 1), ARRAY_GET(b, b->len - 1), a->type_size) <= 0) { if(compar(ARRAY_GET(a, a->len - 1), ARRAY_GET(b, b->len - 1), &a->type_size) <= 0) {
keke_array_pop(a, s) ; keke_array_pop(a, s) ;
keke_array_push(c, s); keke_array_push(c, s);
} else { } else {