diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-05-24 18:50:30 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-05-24 18:50:30 +0200 |
commit | eed252793c04e8b2816f26751657dad7169bded2 (patch) | |
tree | 1cb5a6911dc8c4dd63ea6488cdae0b42501e52c1 | |
parent | 7789f8202f60f69ce015b1bc34eb0c076d7545b5 (diff) |
Map: Fix position calculation between first and second station3.2.1
derp!
-rw-r--r-- | lib/DBInfoscreen/Controller/Map.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/DBInfoscreen/Controller/Map.pm b/lib/DBInfoscreen/Controller/Map.pm index 7013b63..7b5a49b 100644 --- a/lib/DBInfoscreen/Controller/Map.pm +++ b/lib/DBInfoscreen/Controller/Map.pm @@ -123,7 +123,7 @@ sub estimate_train_positions { last; } } - if ( $from_index and $to_index ) { + if ( defined $from_index and defined $to_index ) { my $total_distance = 0; for my $j ( $from_index + 1 .. $to_index ) { my $prev = $features->[ $j - 1 ]{geometry}{coordinates}; |