summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Travel/Status/DE/HAFAS.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Travel/Status/DE/HAFAS.pm b/lib/Travel/Status/DE/HAFAS.pm
index c360150..39339f7 100644
--- a/lib/Travel/Status/DE/HAFAS.pm
+++ b/lib/Travel/Status/DE/HAFAS.pm
@@ -515,13 +515,17 @@ sub mot_mask {
if ( my @mots = @{ $self->{exclusive_mots} // [] } ) {
$mot_mask = 0;
for my $mot (@mots) {
- $mot_mask |= 1 << $mot_pos{$mot};
+ if ( exists $mot_pos{$mot} ) {
+ $mot_mask |= 1 << $mot_pos{$mot};
+ }
}
}
if ( my @mots = @{ $self->{excluded_mots} // [] } ) {
for my $mot (@mots) {
- $mot_mask &= ~( 1 << $mot_pos{$mot} );
+ if ( exists $mot_pos{$mot} ) {
+ $mot_mask &= ~( 1 << $mot_pos{$mot} );
+ }
}
}