From 5c9127df3d10d3a3bd420341c20498ac545ca23e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 29 Dec 2023 11:15:25 +0100 Subject: hafas-m: handle undefined occupancy data --- bin/hafas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/hafas b/bin/hafas index 33fdca8..5be4f19 100755 --- a/bin/hafas +++ b/bin/hafas @@ -217,6 +217,9 @@ sub show_similar_stops { sub display_occupancy { my ($occupancy) = @_; + if (not defined $occupancy) { + return q{?}; + } if ( $occupancy == 1 ) { return q{.}; } -- cgit v1.2.3