aboutsummaryrefslogtreecommitdiff
path: root/lib/vnf/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vnf/src')
-rw-r--r--lib/vnf/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vnf/src/lib.rs b/lib/vnf/src/lib.rs
index a46d291..6c0a6f2 100644
--- a/lib/vnf/src/lib.rs
+++ b/lib/vnf/src/lib.rs
@@ -834,7 +834,7 @@ impl Machine {
// And set flags accordingly.
self.status_register.zero = res == 0;
self.status_register.negative = (res as u8 & 0x80) == 0x80;
- self.status_register.carry = (res as u16 & 0xFF00) != 0;
+ self.status_register.carry = res >= 0;
Ok(())
}