MSVC: Avoid warning when testing a TAP suite without PROVE_FLAGS.
authorNoah Misch
Sun, 7 Jun 2020 23:27:13 +0000 (16:27 -0700)
committerNoah Misch
Sun, 7 Jun 2020 23:27:17 +0000 (16:27 -0700)
Commit 7be5d8df1f74b78620167d3abf32ee607e728919 surfaced the logic
error, which had no functional implications, by adding "use warnings".
The buildfarm always customizes PROVE_FLAGS, so the warning did not
appear there.  Back-patch to 9.5 (all supported versions).

src/tools/msvc/vcregress.pl

index a71300176599d7f381f180b513de4fa047c01880..dac60f6264cf8497b812a4a8ef0a04187d7ecdc8 100644 (file)
@@ -196,7 +196,7 @@ sub tap_check
      unless $config->{tap_tests};
 
    my @flags;
-   foreach my $arg (0 .. scalar(@_))
+   foreach my $arg (0 .. scalar(@_) - 1)
    {
        next unless $_[$arg] =~ /^PROVE_FLAGS=(.*)/;
        @flags = split(/\s+/, $1);