Skip to content

Commit 8adab45

Browse files
committed
Mask off invalid flag bits when using Not
1 parent a281992 commit 8adab45

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
@@ -305,7 +305,7 @@ macro_rules! define_state_flags {
305305

306306
impl core::ops::Not for $flag_type {
307307
type Output = Self;
308-
fn not(self) -> Self::Output { Self(!self.0) }
308+
fn not(self) -> Self::Output { Self(!self.0 & Self::ALL.0) }
309309
}
310310
impl core::ops::BitOr for $flag_type {
311311
type Output = Self;

0 commit comments

Comments
 (0)