Skip to content

Commit 55c050c

Browse files
committed
Correctly read bytes from remote IP
1 parent 211a57a commit 55c050c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/WiFi/src/WiFiUdp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ IPAddress arduino::WiFiUDP::remoteIP() {
159159
}
160160

161161
nsapi_addr_t address = remoteAddress.get_addr();
162-
return IPAddress(address[1][0], address[1][1], address[1][2], address[1][3]);
162+
return IPAddress(address.bytes[0], address.bytes[1], address.bytes[2], address.bytes[3]);
163163
}
164164

165165
uint16_t arduino::WiFiUDP::remotePort() {

0 commit comments

Comments
 (0)