[libconfig-model-dpkg-perl] 05/08: abort optimisation when © years range is empty (Closes: #862368)
dod at debian.org
dod at debian.org
Sat May 13 16:37:07 UTC 2017
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.
commit 2503eb69872a557761204be846ae0a403c463409
Author: Dominique Dumont <dod at debian.org>
Date: Sat May 13 09:42:53 2017 +0200
abort optimisation when © years range is empty (Closes: #862368)
---
lib/Dpkg/Copyright/Scanner.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 43ef96c..e87577b 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -496,7 +496,7 @@ sub __coalesce_copyright_years($entries, $owners) {
my ($id, @years) = $entry->@* ;
for (my $i = 0; $i < @years; $i++) {
- return () if $years[$i] =~ /[^\d,\s-]/;
+ return () unless $years[$i] =~ /^[0-9,\s-]+$/; # detect empty year range
my $span = $ranges_of_years[$i] //= Array::IntSpan->new();
return () unless $span; # bail out in case of problems
eval {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list