fix a another bug caught by fuzzing

This commit is contained in:
Brendan Hansknecht 2024-07-28 17:52:59 -07:00
parent 7747f06504
commit 22896d309a
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -437,7 +437,7 @@ fn flux_analyze(
} else {
if (compare_inc(cmp, cmp_data, ptr_c, ptr_c + element_width, data_is_owned, inc_n_data) != GT) {
// First half needs merge, second half sorted.
@memcpy((swap + half2 * element_width)[0..(half2 * element_width)], (array + half2 * element_width)[0..(half2 * element_width)]);
@memcpy((swap + half1 * element_width)[0..(half2 * element_width)], (array + half1 * element_width)[0..(half2 * element_width)]);
cross_merge(swap, array, quad1, quad2, cmp, cmp_data, element_width, copy, data_is_owned, inc_n_data);
} else {
// Both halves need merge.