Fix WSAStartup() error check on Windows

This commit is contained in:
Romain Vimont
2023-02-27 20:51:35 +01:00
parent 3d10fbd9b4
commit 0cea7fb24c
+2 -2
View File
@@ -30,8 +30,8 @@ bool
net_init(void) {
#ifdef _WIN32
WSADATA wsa;
int res = WSAStartup(MAKEWORD(2, 2), &wsa) < 0;
if (res < 0) {
int res = WSAStartup(MAKEWORD(2, 2), &wsa);
if (res) {
LOGE("WSAStartup failed with error %d", res);
return false;
}