diff options
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |