From eed252793c04e8b2816f26751657dad7169bded2 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 24 May 2020 18:50:30 +0200 Subject: Map: Fix position calculation between first and second station derp! --- lib/DBInfoscreen/Controller/Map.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}; -- cgit v1.2.3