aboutsummaryrefslogtreecommitdiffstats
path: root/Perl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2019-04-03 15:39:18 +0200
committerGuillem Jover <guillem@debian.org>2019-04-03 15:41:37 +0200
commit55bfcb4e07bf8438e654ffca4d86be302d0297b8 (patch)
treefb5b05e160d280494dbe08b5f77c2d364151bbc0 /Perl
parente374b9bf40c4097d7bf37d5ebb003548ef78ea08 (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.pm2
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 {

© 2014-2024 Faster IT GmbH | imprint | privacy policy