diff --git a/cube/User/Src/networkAbstractionLayer_lan.c b/cube/User/Src/networkAbstractionLayer_lan.c index e5d5517..0342a4c 100644 --- a/cube/User/Src/networkAbstractionLayer_lan.c +++ b/cube/User/Src/networkAbstractionLayer_lan.c @@ -147,8 +147,8 @@ void networkSntpEngine(void *handle) { srcAddr[0], srcAddr[1], srcAddr[2], srcAddr[3], srcPort); coloredMsg(LOG_BLUE, "nes, received in the %d. cycles", localHandle->retryCount); - localHandle->seconds = localHandle->ntpMsg.xmt_h - UNIX_NTP_EPOCH_DIFF; - coloredMsg(LOG_BLUE, "nes, seconds: %lu", localHandle->seconds); + localHandle->seconds = ((uint64_t)localHandle->ntpMsg.xmt_h) - UNIX_NTP_EPOCH_DIFF; + coloredMsg(LOG_BLUE, "nes, seconds: %llu", localHandle->seconds); localHandle->sntpState = SNTP_STATE_DONE; } else { coloredMsg(LOG_BLUE, "nes, invalid number of octets received: %d", recvLen);