diff options
-rw-r--r-- | src/devices/machine/timehelp.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/devices/machine/timehelp.h b/src/devices/machine/timehelp.h index 9e1e5efeefc..8716c63c450 100644 --- a/src/devices/machine/timehelp.h +++ b/src/devices/machine/timehelp.h @@ -37,17 +37,18 @@ public: *tens_carry = true; bcd &= 0xf0; bcd += 0x10; - if (bcd > max) - { - bcd = min; - carry = 1; - } } else if (tens_carry) { *tens_carry = false; } + if (bcd > max) + { + bcd = min; + carry = 1; + } + *data = (*data & ~mask) | (bcd & mask); return carry; } |