Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Nov 28, 2023
1 parent 38a514b commit 0a24662
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/registers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ impl Registers {
}

pub fn get_flag(&self, flag: Flags) -> bool {
self.f.contains(flag)
Flags::from_bits(self.f).unwrap().contains(flag)
}

pub fn set_flag(&mut self, flag: Flags, state: bool) {
if state {
self.f |= flag;
self.f |= flag.bits();
} else {
self.f &= !flag;
self.f &= !flag.bits();
}
}

Expand Down

0 comments on commit 0a24662

Please sign in to comment.