Skip to content

Commit 795968a

Browse files
Clean up WIFI local variable MAC size (#2006)
MACs are 6-bytes long, not 8.
1 parent 01ab02d commit 795968a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/WiFi/src/WiFiClass.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class WiFiClass {
154154
}
155155

156156
String softAPmacAddress(void) {
157-
uint8_t mac[8];
157+
uint8_t mac[6];
158158
macAddress(mac);
159159
char buff[32];
160160
sprintf(buff, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
@@ -240,7 +240,7 @@ class WiFiClass {
240240
*/
241241
uint8_t* macAddress(uint8_t* mac);
242242
String macAddress(void) {
243-
uint8_t mac[8];
243+
uint8_t mac[6];
244244
macAddress(mac);
245245
char buff[32];
246246
sprintf(buff, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);

0 commit comments

Comments
 (0)