From 0cea7fb24cf83b04797a96f579fbc34ab8c3184b Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 27 Feb 2023 19:54:43 +0100 Subject: [PATCH] Fix WSAStartup() error check on Windows --- app/src/util/net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/util/net.c b/app/src/util/net.c index ed4882cd..c762a10f 100644 --- a/app/src/util/net.c +++ b/app/src/util/net.c @@ -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; }