mirror of
https://github.com/systemd/systemd.git
synced 2026-11-06 13:27:45 +00:00
When we use the code path that moves the cursor to the previous
`-n` items in vl_method_get_entries we had an off-by-one
error: we moved n+1 items back and then in the loop skipped
one forward. However if there are only `n` (or fewer) items this
would silently skip over first item in this (smaller) list as
we always did a sd_journal_next() (assuming we went back `n+1`
items).
This commit fixes this.
(cherry picked from commit 403e5dfb8e)