stty: fix setting grouped flags

This commit is contained in:
Terts Diepraam 2022-06-27 13:45:59 +02:00 committed by Sylvestre Ledru
parent 96ea772016
commit eac88022b2

View file

@ -210,7 +210,7 @@ fn apply_flag<T: TermiosFlag>(
if input == *name {
// Flags with groups cannot be removed
// Since the name matches, we can short circuit and don't have to check the other flags.
if remove || group.is_some() {
if remove && group.is_some() {
return ControlFlow::Break(false);
}
// If there is a group, the bits for that group should be cleared before applying the flag