From d09b6b9aa1c2ed82a4795f5abbc02f50f00927d9 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 25 Aug 2016 14:10:25 +1000 Subject: [PATCH] esp8266/modpybrtc: Use 64-bit arithmetic when computing alarm expiry. --- esp8266/modpybrtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp8266/modpybrtc.c b/esp8266/modpybrtc.c index 9685248034..500b2bc545 100644 --- a/esp8266/modpybrtc.c +++ b/esp8266/modpybrtc.c @@ -212,7 +212,7 @@ STATIC mp_obj_t pyb_rtc_alarm(mp_obj_t self_in, mp_obj_t alarm_id, mp_obj_t time } // set expiry time (in microseconds) - pyb_rtc_alarm0_expiry = pyb_rtc_get_us_since_2000() + mp_obj_get_int(time_in) * 1000; + pyb_rtc_alarm0_expiry = pyb_rtc_get_us_since_2000() + (uint64_t)mp_obj_get_int(time_in) * 1000; return mp_const_none;