Merge: Fixed quick_sort when array is length 0 or 1
authorJean Privat <jean@pryen.org>
Tue, 28 Jan 2020 20:03:52 +0000 (15:03 -0500)
committerJean Privat <jean@pryen.org>
Tue, 28 Jan 2020 20:03:52 +0000 (15:03 -0500)
commit4523ec49a917e16f7840cbe4f1aa2fcc9b6c7a00
treef25589e45d179bb680b50190eda8618708a3bb2e
parent9c25a1a467a92762e7ab7197a6702b1b73aa2ec3
parent6c134b31bc63891eb9210e50ffe27aa0126febaa
Merge: Fixed quick_sort when array is length 0 or 1

Fixed a bug where quick_sort could access out of bound element when `to` argument smaller or
equal to 0.

# Before

var xs = [1]
default_comparator.quick_sort(xs) # assertion failed

# After

var xs = [1]
default_comparator.quick_sort(xs)
assert xs == [1] # true

Signed-off-by: Louis-Vincent Boudreault <lv.boudreault95@gmail.com>

Pull-Request: #2811