diff options
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 29af8f2..4d3c7d5 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -488,8 +488,7 @@ sub map_history { next; } - my $key - = $from_eva . '!' . $to_eva . '!' . $from_index . '!' . $to_index; + my $key = $from_eva . '!' . $to_eva . '!' . ( $to_index - $from_index ); if ( $seen{$key} ) { next; @@ -498,7 +497,7 @@ sub map_history { $seen{$key} = 1; # direction does not matter at the moment - $key = $to_eva . '!' . $from_eva . '!' . $to_index . '!' . $from_index; + $key = $to_eva . '!' . $from_eva . '!' . ( $to_index - $from_index ); $seen{$key} = 1; @polyline = @polyline[ $from_index .. $to_index ]; |