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)
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


Trivial merge