sources/network/udpsocket.cpp

changeset 180
2e7225dbd9b2
parent 158
de7574d292ad
child 182
20ca0a6be175
--- a/sources/network/udpsocket.cpp	Wed Jan 27 13:02:51 2021 +0200
+++ b/sources/network/udpsocket.cpp	Wed Jan 27 13:08:51 2021 +0200
@@ -135,7 +135,7 @@
 		decodedPacket, length, &decodedLength);
 	datagram.address.host = ntohl (claddr.sin_addr.s_addr);
 	datagram.address.port = ntohs (claddr.sin_port);
-	datagram.message = ByteArray(decodedPacket, decodedLength);
+	datagram.message = ByteArray{&decodedPacket[0], &decodedPacket[decodedLength]};
 	return true;
 }
 

mercurial