Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ws2_32/socket.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1ac1f77d6e6..5089029f4b4 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -7648,7 +7648,13 @@ SOCKET WINAPI WSASocketW(int af, int type, int protocol, protocol = lpProtocolInfo->iProtocol; }
- if (!type && (af || protocol)) + if (!af && !protocol) + { + WSASetLastError(WSAEINVAL); + return INVALID_SOCKET; + } + + if (!type) { int autoproto = protocol; WSAPROTOCOL_INFOW infow;