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

mot_mask: skip unknown mot types

parent 457ea50f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -515,15 +515,19 @@ sub mot_mask {
	if ( my @mots = @{ $self->{exclusive_mots} // [] } ) {
		$mot_mask = 0;
		for my $mot (@mots) {
			if ( exists $mot_pos{$mot} ) {
				$mot_mask |= 1 << $mot_pos{$mot};
			}
		}
	}

	if ( my @mots = @{ $self->{excluded_mots} // [] } ) {
		for my $mot (@mots) {
			if ( exists $mot_pos{$mot} ) {
				$mot_mask &= ~( 1 << $mot_pos{$mot} );
			}
		}
	}

	return $mot_mask;
}