From 5bce34bc5ed869760a893639049308cfbda1d8f2 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 10 Oct 2024 19:07:23 +0700 Subject: [PATCH] fix networking stack crash --- ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaCommon.hpp | 2 +- ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaIoT.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaCommon.hpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaCommon.hpp index 9b29fe3..eb24443 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaCommon.hpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaCommon.hpp @@ -1,3 +1,3 @@ #pragma once -#define SDK_VESRION "2.9.6" \ No newline at end of file +#define SDK_VESRION "2.9.7" \ No newline at end of file diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaIoT.cpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaIoT.cpp index 04c55d8..4ea5eb0 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaIoT.cpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/ESPMegaIoT.cpp @@ -633,7 +633,7 @@ void ESPMegaIoT::loadNetworkConfig() // subnet: 255.255.255.0 // dns1: 1.1.1.1 // dns2: 9.9.9.9 - if (network_config.ip == 0 && network_config.gateway == 0 && network_config.subnet == 0 && network_config.dns1 == 0 && network_config.dns2 == 0) + if ((uint32_t)network_config.ip == 0 && (uint32_t)network_config.gateway == 0 && (uint32_t)network_config.subnet == 0 && (uint32_t)network_config.dns1 == 0 && (uint32_t)network_config.dns2 == 0) { network_config.ip = IPAddress(192, 168, 0, 99); network_config.gateway = IPAddress(192, 168, 0, 1);