From 89c7c9af36af6f95d03b5d4c829090300bfe462e Mon Sep 17 00:00:00 2001 From: pennam Date: Mon, 28 Oct 2024 12:48:02 +0100 Subject: [PATCH] SocketHelpers: fix macAddress(uint8_t* mac) reversed order --- libraries/SocketWrapper/src/SocketHelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/SocketWrapper/src/SocketHelpers.cpp b/libraries/SocketWrapper/src/SocketHelpers.cpp index 25af983f3..c4f5fc5e7 100644 --- a/libraries/SocketWrapper/src/SocketHelpers.cpp +++ b/libraries/SocketWrapper/src/SocketHelpers.cpp @@ -5,7 +5,7 @@ uint8_t* arduino::MbedSocketClass::macAddress(uint8_t* mac) { for (int b = 0; b < 6; b++) { uint32_t tmp; sscanf(&mac_str[b * 2 + (b)], "%02x", (unsigned int*)&tmp); - mac[5 - b] = (uint8_t)tmp; + mac[b] = (uint8_t)tmp; } return mac; }