diff options
author | Guillem Jover <guillem@debian.org> | 2019-04-03 15:39:18 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-04-03 15:41:37 +0200 |
commit | 55bfcb4e07bf8438e654ffca4d86be302d0297b8 (patch) | |
tree | fb5b05e160d280494dbe08b5f77c2d364151bbc0 /Perl | |
parent | e374b9bf40c4097d7bf37d5ebb003548ef78ea08 (diff) |
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.
Diffstat (limited to 'Perl')
-rw-r--r-- | Perl/Local/VCS_git.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Perl/Local/VCS_git.pm b/Perl/Local/VCS_git.pm index 9c76c0ba969..9bbb17988f8 100644 --- a/Perl/Local/VCS_git.pm +++ b/Perl/Local/VCS_git.pm @@ -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 { |