From daf18e7777366d9b26a20d3e5788fa0cb66a7caa Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 27 Feb 2021 11:48:25 +0100 Subject: AK: Use Array iterator instead of indexing outside Array bounds --- AK/Tests/TestQuickSort.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'AK/Tests') diff --git a/AK/Tests/TestQuickSort.cpp b/AK/Tests/TestQuickSort.cpp index 8902de967f..d976e07b81 100644 --- a/AK/Tests/TestQuickSort.cpp +++ b/AK/Tests/TestQuickSort.cpp @@ -60,7 +60,7 @@ TEST_CASE(sorts_without_copy) for (size_t i = 0; i < 64; ++i) array[i].value = (64 - i) % 32 + 32; - AK::single_pivot_quick_sort(&array[0], &array[64], [](auto& a, auto& b) { return a.value < b.value; }); + AK::single_pivot_quick_sort(array.begin(), array.end(), [](auto& a, auto& b) { return a.value < b.value; }); for (size_t i = 0; i < 63; ++i) EXPECT(array[i].value <= array[i + 1].value); -- cgit v1.2.3