summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-05-24 18:50:30 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-05-24 18:50:30 +0200
commiteed252793c04e8b2816f26751657dad7169bded2 (patch)
tree1cb5a6911dc8c4dd63ea6488cdae0b42501e52c1 /lib
parent7789f8202f60f69ce015b1bc34eb0c076d7545b5 (diff)
Map: Fix position calculation between first and second station3.2.1
derp!
Diffstat (limited to 'lib')
-rw-r--r--lib/DBInfoscreen/Controller/Map.pm2
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};