Skip to content

Commit 2ff0fa5

Browse files
Merge branch 'master' into split-iram
2 parents 8d1ec76 + f139519 commit 2ff0fa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/esp8266wifi/udp-examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Once we have libraries in place we need to create a ``WiFiUDP`` object. Then we
3535
3636
WiFiUDP Udp;
3737
unsigned int localUdpPort = 4210;
38-
char incomingPacket[255];
38+
char incomingPacket[256];
3939
char replyPacket[] = "Hi there! Got the message :-)";
4040
4141
Wi-Fi Connection
@@ -68,7 +68,7 @@ Waiting for incoming UDP packed is done by the following code:
6868
int len = Udp.read(incomingPacket, 255);
6969
if (len > 0)
7070
{
71-
incomingPacket[len] = 0;
71+
incomingPacket[len] = '\0';
7272
}
7373
Serial.printf("UDP packet contents: %s\n", incomingPacket);
7474

0 commit comments

Comments
 (0)