Fix WSAStartup() error check on Windows

This commit is contained in:
Romain Vimont 2023-02-27 19:54:43 +01:00
parent 3d10fbd9b4
commit 0cea7fb24c

View file

@ -30,8 +30,8 @@ bool
net_init(void) { net_init(void) {
#ifdef _WIN32 #ifdef _WIN32
WSADATA wsa; WSADATA wsa;
int res = WSAStartup(MAKEWORD(2, 2), &wsa) < 0; int res = WSAStartup(MAKEWORD(2, 2), &wsa);
if (res < 0) { if (res) {
LOGE("WSAStartup failed with error %d", res); LOGE("WSAStartup failed with error %d", res);
return false; return false;
} }