Zeropad MAC addressses

This commit is contained in:
Scott Baker 2023-04-30 19:40:41 -07:00
parent ca672090bd
commit aefb6c1a91

View File

@ -235,7 +235,7 @@ String get_mac_address() {
// Build a string and return it // Build a string and return it
char buf[20] = ""; char buf[20] = "";
snprintf(buf, sizeof(buf), "%X:%X:%X:%X:%X:%X", mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]); snprintf(buf, sizeof(buf), "%02X:%02X:%02X:%02X:%02X:%02X", mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
String ret = buf; String ret = buf;