summaryrefslogtreecommitdiff
path: root/src/network/core/udp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/core/udp.cpp')
-rw-r--r--src/network/core/udp.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index 57352412b..aa6d39cbb 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -129,6 +129,9 @@ void NetworkUDPSocketHandler::ReceivePackets()
/* Did we get the bytes for the base header of the packet? */
if (nbytes <= 0) break; // No data, i.e. no packet
if (nbytes <= 2) continue; // Invalid data; try next packet
+#ifdef __EMSCRIPTEN__
+ client_len = FixAddrLenForEmscripten(client_addr);
+#endif
NetworkAddress address(client_addr, client_len);
p.PrepareToRead();