Skip to content

Commit 69ffd92

Browse files
Sackzementsezero
authored andcommitted
PumpDatagramSocket(): return -1 on invalid socket parameter
1 parent e4a9733 commit 69ffd92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SDL_net.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,8 @@ static int SendOneDatagram(SDLNet_DatagramSocket *sock, SDLNet_Address *addr, Ui
13571357
static int PumpDatagramSocket(SDLNet_DatagramSocket *sock)
13581358
{
13591359
if (!sock) {
1360-
return SDL_InvalidParamError("sock");
1360+
SDL_InvalidParamError("sock");
1361+
return -1;
13611362
}
13621363

13631364
while (sock->pending_output_len > 0) {

0 commit comments

Comments
 (0)