From 64de1ecfe7b3e88cb9f04c993e14ab85c2b5c532 Mon Sep 17 00:00:00 2001 From: Oleg Ogurtsov Date: Wed, 11 Jul 2012 00:03:27 +0000 Subject: [PATCH] hw/exynos4210_rtc.c: Fix calculating for value of year Signed-off-by: Oleg Ogurtsov Signed-off-by: Peter Maydell --- hw/exynos4210_rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/exynos4210_rtc.c b/hw/exynos4210_rtc.c index f78102049b..b42586eb21 100644 --- a/hw/exynos4210_rtc.c +++ b/hw/exynos4210_rtc.c @@ -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) -- 2.34.1