mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
fix potential crash case
This commit is contained in:
parent
0aaf9e2529
commit
a0dd18b0fc
1 changed files with 1 additions and 1 deletions
|
@ -1520,7 +1520,7 @@ fn quad_swap(
|
|||
break :reverse_block;
|
||||
if (rem >= 1 and compare(cmp, cmp_data, arr_ptr - 1 * element_width, arr_ptr + 0 * element_width) != GT)
|
||||
break :reverse_block;
|
||||
quad_reversal(reverse_head, arr_ptr + (rem - 1) * element_width, element_width, copy);
|
||||
quad_reversal(reverse_head, arr_ptr + rem * element_width - element_width, element_width, copy);
|
||||
|
||||
// If we just reversed the entire array, it is sorted.
|
||||
if (reverse_head == array)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue