mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
Fix additional unsigned sub overflow bug
This commit is contained in:
parent
b5225c87d8
commit
4ea91b54eb
@ -30,7 +30,10 @@ quicksortHelp = \list, order, low, high ->
|
||||
when partition low high list order is
|
||||
Pair partitionIndex partitioned ->
|
||||
partitioned
|
||||
|> quicksortHelp order low (partitionIndex - 1)
|
||||
|> \lst ->
|
||||
# TODO: this will be nicer if we have Num.subSaturated
|
||||
high1 = if partitionIndex == 0 then 0 else partitionIndex - 1
|
||||
quicksortHelp lst order low high1
|
||||
|> quicksortHelp order (partitionIndex + 1) high
|
||||
else
|
||||
list
|
||||
|
Loading…
Reference in New Issue
Block a user