summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Brunel <jjk@jjacky.com>2014-12-05 16:06:45 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-08 19:38:55 +0100
commit2173cbf847fc53ca24950e77958c902edecfc207 (patch)
treedfdc0f7f9cbc7f7bbc9ef2079948f44a1b04d710 /src
parent1e19f35297ee757095cf372c82c3d9a6bb2311d3 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/journal/journal-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 7858435bad..c5d2d19433 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1657,7 +1657,7 @@ static int generic_array_bisect(
}
}
- if (k > n) {
+ if (k >= n) {
if (direction == DIRECTION_UP) {
i = n;
subtract_one = true;