Unverified Commit 4764fd9a authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

route_after: handle passing the same stop more than once

parent cd6df2aa
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -221,8 +221,15 @@ sub postprocess {
		if ($is_after) {
			push( @route_after, $station );
		}
		if (    $ret->{dep_name}
			and $station->[0] eq $ret->{dep_name} )

		# Note that the departure stop may be present more than once in @route,
		# e.g. when traveling along ring lines such as S41 / S42 in Berlin.
		if (
			    $ret->{dep_name}
			and $station->[0] eq $ret->{dep_name}
			and not($station->[2]{sched_dep}
				and $station->[2]{sched_dep} < $ret->{sched_dep_ts} )
		  )
		{
			$is_after = 1;
			if ( @{$station} > 1 and not $dep_info ) {