Zigbee map fix potential negative number

This commit is contained in:
Stephan Hadinger 2021-11-06 19:22:35 +01:00
parent f2b08bba52
commit 318a9cbc99
1 changed files with 1 additions and 1 deletions

View File

@ -2106,7 +2106,7 @@ void ZigbeeShowMap(void) {
if (zigbee.init_phase) {
WSContentSend_P(PSTR(D_ZIGBEE_NOT_STARTED));
} else if (zigbee.mapping_in_progress) {
int32_t mapping_remaining = 1 + (zigbee.mapping_end_time - millis()) / 1000;
int32_t mapping_remaining = 1 + ((int32_t) zigbee.mapping_end_time - millis()) / 1000;
if (mapping_remaining < 0) { mapping_remaining = 0; }
WSContentSend_P(PSTR(D_ZIGBEE_MAPPING_IN_PROGRESS_SEC), mapping_remaining);
WSContentSend_P(msg[ZB_WEB_AUTO_REFRESH]);