fix spots array so that the correct no of fields are always available.
[spider.git] / perl / VE7CC.pm
index 2e931777969820577dcdadf8c74d7f7f0b13e087..e6634b6209c7d80ef8c76f5e879e75f9b0734e30 100644 (file)
@@ -30,9 +30,13 @@ sub dx_spot
        my $freq = shift;
        my $spotted = shift;
        my $t = shift;
+
+       # remove any items above the top of the max spot data
+       pop while @_ > 11;
        
-       # remove interface callsign;
-       pop;
+       # make sure both US states are defined
+       $_[9] ||= '';
+       $_[10] ||= '';
        
        my $spotter_cc = (Prefix::cty_data($spotted))[5];
        my $spotted_cc = (Prefix::cty_data($_[1]))[5];