commit | 47e10a68302c93905580a9ea698296573f70ec5a | [log] [tgz] |
---|---|---|
author | Marcin Niestroj <m.niestroj@grinn-global.com> | Tue Oct 05 11:15:33 2021 +0200 |
committer | Christopher Friedt <chrisfriedt@gmail.com> | Tue Oct 05 19:24:58 2021 -0400 |
tree | dc1496893682796ab07be97971533e62058bfa49 | |
parent | ed55ee95e9426255683695414570a1e73534f7c4 [diff] |
drivers: lora: fix RtcGetCalendarTime() Uptime in milliseconds is assigned to uint32_t variable, which results in integer overflow after enough time has expired. Additionally milliseconds part (which should be 0-999) is assigned directly from uptime, without subtracting full seconds. Fix both issues by using int64_t variable and calculating milliseconds with modulo. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>