]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Status.pm
* "Allow" for negative bug numbers in readbug
[debbugs.git] / Debbugs / Status.pm
index a7bce9de712c3d985be65bfad84bd7f1a8f16584..565daeb87c01b57682a230612ff8e19b0b2c4eec 100644 (file)
@@ -132,7 +132,10 @@ sub read_bug{
     my %param = validate_with(params => \@_,
                              spec   => {bug => {type => SCALAR,
                                                 optional => 1,
-                                                regex    => qr/^\d+/,
+                                                # something really
+                                                # stupid passes
+                                                # negative bugnumbers
+                                                regex    => qr/^-?\d+/,
                                                },
                                         location => {type => SCALAR|UNDEF,
                                                      optional => 1,
@@ -440,7 +443,7 @@ sub addfixedversions {
     my $version = shift;
     my $isbinary = shift;
     return unless defined $version;
-    undef $package if $package =~ m[(?:\s|/)];
+    undef $package if defined $package and $package =~ m[(?:\s|/)];
     my $source = $package;
 
     if (defined $package and $isbinary) {