mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-15 10:05:28 +00:00
journal: Fix navigating backwards missing entries
With DIRECTION_UP (i.e. navigating backwards) in generic_array_bisect() when the
needle was found as the last item in the array, it wasn't actually processed as
match, resulting in entries being missed.
https://bugs.freedesktop.org/show_bug.cgi?id=86855
(cherry picked from commit 2173cbf847)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
438a97630f
commit
c3ce6202ec
@@ -1657,7 +1657,7 @@ static int generic_array_bisect(
|
||||
}
|
||||
}
|
||||
|
||||
if (k > n) {
|
||||
if (k >= n) {
|
||||
if (direction == DIRECTION_UP) {
|
||||
i = n;
|
||||
subtract_one = true;
|
||||
|
||||
Reference in New Issue
Block a user