projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prevent hop counts of -1 being generated.
[spider.git]
/
perl
/
DXProt.pm
diff --git
a/perl/DXProt.pm
b/perl/DXProt.pm
index bc753c3d784e6b053a5d67d147a8807d7ef6f855..596f1f08d3a1256d1ddfab84a815b6be674feee3 100644
(file)
--- a/
perl/DXProt.pm
+++ b/
perl/DXProt.pm
@@
-1008,7
+1008,7
@@
sub adjust_hops
my $call = $self->{call};
my $hops;
my $call = $self->{call};
my $hops;
- if (($hops) = $s =~ /\^H(
\d
+)\^?~?$/o) {
+ if (($hops) = $s =~ /\^H(
[-\d]
+)\^?~?$/o) {
my ($pcno) = $s =~ /^PC(\d\d)/o;
confess "$call called adjust_hops with '$s'" unless $pcno;
my $ref = $nodehops{$call} if %nodehops;
my ($pcno) = $s =~ /^PC(\d\d)/o;
confess "$call called adjust_hops with '$s'" unless $pcno;
my $ref = $nodehops{$call} if %nodehops;
@@
-1017,8
+1017,11
@@
sub adjust_hops
return "" if defined $newhops && $newhops == 0;
$newhops = $ref->{default} unless $newhops;
return "" if defined $newhops && $newhops == 0;
return "" if defined $newhops && $newhops == 0;
$newhops = $ref->{default} unless $newhops;
return "" if defined $newhops && $newhops == 0;
- $newhops = $hops if !$newhops;
- $s =~ s/\^H(\d+)(\^~?)$/\^H$newhops$2/ if $newhops;
+ $newhops = $hops unless $newhops;
+ return "" unless $newhops > 0;
+ $s =~ s/\^H(\d+)(\^~?)$/\^H$newhops$2/ if $newhops != $hops;
+ } else {
+ return "" unless $hops > 0;
}
}
return $s;
}
}
return $s;