]> git.proxmox.com Git - qemu.git/commitdiff
hw/exynos4210_rtc.c: Fix calculating for value of year
authorOleg Ogurtsov <o.ogurtsov@samsung.com>
Wed, 11 Jul 2012 00:03:27 +0000 (00:03 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 20 Jul 2012 13:16:14 +0000 (14:16 +0100)
Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/exynos4210_rtc.c

index f78102049bee32110381d91b84fd1e20a66d46dd..b42586eb217d44c8fdd07cff461b9d72128107f3 100644 (file)
@@ -142,7 +142,7 @@ static const VMStateDescription vmstate_exynos4210_rtc_state = {
 };
 
 #define BCD3DIGITS(x) \
-    ((uint32_t)to_bcd((uint8_t)x) + \
+    ((uint32_t)to_bcd((uint8_t)(x % 100)) + \
     ((uint32_t)to_bcd((uint8_t)((x % 1000) / 100)) << 8))
 
 static void check_alarm_raise(Exynos4210RTCState *s)