From: Dirk Koopman Date: Sat, 8 Mar 2014 00:18:18 +0000 (+0000) Subject: fix small crash with Spot::dup X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=commitdiff_plain;h=0c963c43ab1cc4028eb79e366d5c0cfa4575b057 fix small crash with Spot::dup This may have something to do with the new wpxloc.raw format that I am now using (erm.. testing). But if I check for a a duplicate of the prefix in the remarks, and that "prefix" (char string length <= 4) contains a space, Spot::dup crashes. Intermittently. --- diff --git a/Changes b/Changes index 42dd9026..d3a17adf 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ 07Mar14======================================================================= 1. Add new version of wpxloc.raw +2. Fix a small crash with Spot::dup 12Jan14======================================================================= 1. Fix minor issue with dx command when used in a script, as found by Christian Furst. diff --git a/cmd/show/prefix.pl b/cmd/show/prefix.pl index e8e939e6..1689d63a 100644 --- a/cmd/show/prefix.pl +++ b/cmd/show/prefix.pl @@ -10,10 +10,13 @@ my @list = split /\s+/, $line; # generate a list of callsigns my $l; my @out; +#$DB::single = 1; + #print "line: $line\n"; foreach $l (@list) { my @ans = Prefix::extract($l); next if !@ans; +# dbg(join(', ', @ans)); my $pre = shift @ans; my $a; foreach $a (@ans) { diff --git a/perl/Spot.pm b/perl/Spot.pm index 7fcba6d1..f6b14564 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -403,7 +403,7 @@ sub dup $text =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; $text = uc unpad($text); if ($cty && $text && length $text <= 4) { - unless ($text =~ /^C?Q/ || $text =~ /^\d+$/) { + unless ($text =~ /^C?Q/ || $text =~ /^\d+$/ || $text =~ /\s/) { my @try = Prefix::cty_data($text); $text = "" if $cty == $try[0]; } diff --git a/perl/Version.pm b/perl/Version.pm index 64bbf7eb..70339211 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,7 +11,7 @@ use vars qw($version $subversion $build $gitversion); $version = '1.55'; $subversion = '0'; -$build = '142'; -$gitversion = '210ee86'; +$build = '143'; +$gitversion = '3b2eb09'; 1;