diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2023-06-04 01:27:03 +0200 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2023-06-04 01:27:03 +0200 |
| commit | 7547c3b2c2e0f5daf1fb712b5d616e817ac474bf (patch) | |
| tree | 3157944686b67471d7b0e2d60124040654a89a49 /main.c | |
| parent | 5118a937dfab0a47763f2262f208ea049b42b9b1 (diff) | |
Diffstat (limited to 'main.c')
| -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); |
