diff --git a/libraries/WiFiS3/src/WiFi.cpp b/libraries/WiFiS3/src/WiFi.cpp index f99fd6db..6cd63526 100644 --- a/libraries/WiFiS3/src/WiFi.cpp +++ b/libraries/WiFiS3/src/WiFi.cpp @@ -219,7 +219,7 @@ static bool macStr2macArray(uint8_t *mac_out, const char *mac_in) { return false; } - for(int i = 0; i < 6; i++) { + for(int i = 0; i < WL_MAC_ADDR_LENGTH; i++) { std::string str_num(mac_in+(i*3),2); *(mac_out+i) = std::stoul(str_num,nullptr,16); } diff --git a/libraries/WiFiS3/src/WiFi.h b/libraries/WiFiS3/src/WiFi.h index 68774fb0..8a50f417 100644 --- a/libraries/WiFiS3/src/WiFi.h +++ b/libraries/WiFiS3/src/WiFi.h @@ -19,6 +19,7 @@ #define WIFI_FIRMWARE_LATEST_VERSION "0.4.1" +#define WL_MAC_ADDR_LENGTH 6 class CAccessPoint { public: