diff --git a/rpcs3/main.cpp b/rpcs3/main.cpp index 5238d79367..aa79213b8c 100644 --- a/rpcs3/main.cpp +++ b/rpcs3/main.cpp @@ -490,8 +490,11 @@ int main(int argc, char** argv) report_fatal_error("Not enough memory for RPCS3 process."); } - WSADATA wsa_data; - WSAStartup(MAKEWORD(2, 2), &wsa_data); + WSADATA wsa_data{}; + if (const int res = WSAStartup(MAKEWORD(2, 2), &wsa_data); res != 0) + { + report_fatal_error(fmt::format("WSAStartup failed (error=%s)", fmt::win_error_to_string(res, nullptr))); + } #endif ensure(thread_ctrl::is_main(), "Not main thread");