summaryrefslogtreecommitdiff
path: root/src/sdl_udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sdl_udp.c')
-rw-r--r--src/sdl_udp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sdl_udp.c b/src/sdl_udp.c
index e6b669a..f4888ad 100644
--- a/src/sdl_udp.c
+++ b/src/sdl_udp.c
@@ -124,6 +124,10 @@ int writeSdlUdpSocket(sock_sdl_udp_t *src, sock_sdl_udp_t *dst, void *address, i
assert( src != NULL );
assert( address != NULL );
+#ifdef DEBUG_LOST_PACKET
+ if( rand() % DEBUG_LOST_PACKET == 0 )return size;
+#endif
+
memcpy(dst->packet->data, address, len);
dst->packet->len = len;