Bugfix: Update variable minutesUntilNextUpdate to 32-bit integer because of integer overflow

This commit is contained in:
mnyhlen
2024-06-12 20:59:19 +02:00
committed by GitHub
parent 1d1845580b
commit 6981171a6e

View File

@@ -64,7 +64,7 @@ void contentRunner() {
}
if (taginfo->expectedNextCheckin > now - 10 && taginfo->expectedNextCheckin < now + 30 && taginfo->pendingIdle == 0 && taginfo->pendingCount == 0) {
int16_t minutesUntilNextUpdate = (taginfo->nextupdate - now) / 60;
int32_t minutesUntilNextUpdate = (taginfo->nextupdate - now) / 60;
if (minutesUntilNextUpdate > config.maxsleep) {
minutesUntilNextUpdate = config.maxsleep;
}