Unverified Commit 859b03f4 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Formation/Carriage: start/end may be undef

parent 866dc9e4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -99,7 +99,9 @@ sub new {
	  = ( $pos->{start} - $platform->{start} ) * 100 / $platform_length,
	  $ref->{end_percent}
	  = ( $pos->{end} - $platform->{start} ) * 100 / $platform_length,
	  if ( defined $pos->{start} and defined $pos->{end} ) {
		$ref->{length_meters} = $pos->{start} - $pos->{end};
	}
	$ref->{length_percent} = $ref->{end_percent} - $ref->{start_percent};

	if (   $pos->{start} eq ''