summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-12-29 11:15:25 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2023-12-29 11:15:34 +0100
commit5c9127df3d10d3a3bd420341c20498ac545ca23e (patch)
treec10decca2f3f51e2147fd77ea2f5675454013bb6 /bin
parentb60e5eef740af4954313d22eca17983d34774d32 (diff)
hafas-m: handle undefined occupancy data
Diffstat (limited to 'bin')
-rwxr-xr-xbin/hafas3
1 files changed, 3 insertions, 0 deletions
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{.};
}