1
0
Fork 0

Fixed the initialization of the struct addrinfo.

This commit is contained in:
Bertrand Coconnier 2021-01-09 17:53:28 +01:00
parent d1f35253e2
commit 12996087de

View file

@ -92,7 +92,8 @@ FGfdmSocket::FGfdmSocket(const string& address, int port, int protocol)
if (!LoadWinSockDLL(debug_lvl)) return; if (!LoadWinSockDLL(debug_lvl)) return;
#endif #endif
struct addrinfo hints = {}; struct addrinfo hints;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_INET; hints.ai_family = AF_INET;
if (protocol == ptUDP) if (protocol == ptUDP)
hints.ai_socktype = SOCK_DGRAM; hints.ai_socktype = SOCK_DGRAM;