about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-08-06 16:21:17 +0000
committerGraham Barr <gbarr@pobox.com>2001-08-06 16:21:17 +0000
commit4e2662fff6dbbd0789454bc43a1f8f2eb48e7658 (patch)
treeb5cfa8d07f3cce5c95106f71de7b9b86411ee3ed
parent922491a8991b68b8e51f258ed20d015f2db96cee (diff)
downloadperl-libnet-4e2662fff6dbbd0789454bc43a1f8f2eb48e7658.tar.gz
Fix for _msg_spec when passed the same msg number twice, pass N instead of N-N
-rw-r--r--Net/NNTP.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/Net/NNTP.pm b/Net/NNTP.pm
index 2670a7f..c61b83e 100644
--- a/Net/NNTP.pm
+++ b/Net/NNTP.pm
@@ -14,7 +14,7 @@ use Carp;
 use Time::Local;
 use Net::Config;
 
-$VERSION = "2.19"; # $Id: //depot/libnet/Net/NNTP.pm#11 $
+$VERSION = "2.19"; # $Id: //depot/libnet/Net/NNTP.pm#12 $
 @ISA     = qw(Net::Cmd IO::Socket::INET);
 
 sub new
@@ -514,9 +514,14 @@ sub _msg_arg
   {
    if(ref($spec))
     {
-     $arg = $spec->[0] . "-";
-     $arg .= $spec->[1]
-        if defined $spec->[1] && $spec->[1] > $spec->[0];
+     $arg = $spec->[0];
+     if(defined $spec->[1])
+      {
+       $arg .= "-"
+          if $spec->[1] != $spec->[0];
+       $arg .= $spec->[1]
+          if $spec->[1] > $spec->[0];
+      }
     }
    else
     {
@@ -1059,6 +1064,6 @@ it under the same terms as Perl itself.
 
 =for html <hr>
 
-I<$Id: //depot/libnet/Net/NNTP.pm#11 $>
+I<$Id: //depot/libnet/Net/NNTP.pm#12 $>
 
 =cut