Skip to content

Commit f0eb550

Browse files
authored
use static_assert to check on fw structure changes over updates (fix) (#5946)
1 parent ca79f2c commit f0eb550

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
6464
*/
6565
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
6666

67+
#ifdef NONOSDK3V0
68+
static_assert(sizeof(station_config) == 116, "struct station_config has changed, please update comparison function");
69+
#else
6770
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
71+
#endif
6872

6973
if(strncmp(reinterpret_cast<const char*>(lhs.ssid), reinterpret_cast<const char*>(rhs.ssid), sizeof(lhs.ssid)) != 0) {
7074
return false;

0 commit comments

Comments
 (0)