summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2023-06-04 01:27:03 +0200
committerDirk Engling <erdgeist@erdgeist.org>2023-06-04 01:27:03 +0200
commit7547c3b2c2e0f5daf1fb712b5d616e817ac474bf (patch)
tree3157944686b67471d7b0e2d60124040654a89a49 /main.c
parent5118a937dfab0a47763f2262f208ea049b42b9b1 (diff)
Ensure a complete bufferHEADmain
Diffstat (limited to 'main.c')
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 82b3c07..48d6e29 100644
--- a/main.c
+++ b/main.c
@@ -52,7 +52,7 @@ int main() {
52 if (ev.type == SDL_QUIT) exit(0); 52 if (ev.type == SDL_QUIT) exit(0);
53 53
54 size_t received = recvfrom(sock_in, inbuf, sizeof(inbuf), 0, NULL, 0); 54 size_t received = recvfrom(sock_in, inbuf, sizeof(inbuf), 0, NULL, 0);
55 if (received == -1) 55 if (received == -1 || received < sizeof(inbuf))
56 continue; 56 continue;
57 57
58 printf("Packet received, size: %zd\n", received); 58 printf("Packet received, size: %zd\n", received);