Commit 55bfcb4e authored by Guillem Jover's avatar Guillem Jover

Perl::Local::VCS_git: Fix an off-by-one error in next_revision()

We should be checking whether the commit index is greater than the
last index of the @commits array.
parent e374b9bf
......@@ -1253,7 +1253,7 @@ sub next_revision
# way...
$pos2 = $pos1 - $move;
if ($pos2 < 0 or $pos2 >= $#commits) {
if ($pos2 < 0 or $pos2 > $#commits) {
# Out of range when looking for the new revision
$ret = undef;
} else {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment