Skip to content

Commit 08b6c12

Browse files
committed
Fix buffer size for toString
1 parent dc78883 commit 08b6c12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/MacAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int MacAddress::toString(char *buf) {
125125
}
126126

127127
String MacAddress::toString() const {
128-
uint8_t bytes = (_type == MAC6) ? 6 : 8;
128+
uint8_t bytes = (_type == MAC6) ? 18 : 24;
129129
char buf[bytes];
130130
if(_type == MAC6) {
131131
snprintf(buf, sizeof(buf), "%02X:%02X:%02X:%02X:%02X:%02X",

0 commit comments

Comments
 (0)