diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-12 17:39:52 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-08-12 17:39:52 +0200 |
commit | 2f25716a2f03a9cfce60af20f99d70d9a798205d (patch) | |
tree | 87ac4492c2cfd3e681445aeec1c2022db6352e1c | |
parent | 91709c4ee4aa766ace28b6f547f311baa8dbaa93 (diff) |
hafas-m: handle messages where ->text is undef
-rwxr-xr-x | bin/hafas-m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/hafas-m b/bin/hafas-m index b033493..5c81c55 100755 --- a/bin/hafas-m +++ b/bin/hafas-m @@ -658,11 +658,11 @@ if ($offset_len) { for my $m ( $status->messages ) { if ( $m->ref_count > 0 and $m->{show} ) { - if ( $m->short ) { + if ( $m->short and $m->text ) { printf( "\n# (%d) %s\n# %s\n", $m->{id}, $m->short, $m->text ); } - else { - printf( "\n# (%d) %s\n", $m->{id}, $m->text ); + elsif ( $m->short or $m->text ) { + printf( "\n# (%d) %s\n", $m->{id}, $m->text || $m->short ); } } } |