Skip to content

Commit d2b50cf

Browse files
committed
Mask off invalid flag bits when using Not
1 parent bdaafaf commit d2b50cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ macro_rules! define_state_flags {
310310

311311
impl core::ops::Not for $flag_type {
312312
type Output = Self;
313-
fn not(self) -> Self::Output { Self(!self.0) }
313+
fn not(self) -> Self::Output { Self(!self.0 & Self::ALL.0) }
314314
}
315315
impl core::ops::BitOr for $flag_type {
316316
type Output = Self;

0 commit comments

Comments
 (0)