Explicitly initialize sock to ~0 if WSAStartup fails.

This commit is contained in:
Jason Watkins
2015-04-30 09:30:46 -07:00
parent a9aba0e8de
commit ed8d065642

View File

@@ -27,6 +27,7 @@ namespace XPC
#if LOG_VERBOSITY > 0
Log::FormatLine("[SOCK] ERROR: WSAStartup failed with error code %i.", startResult);
#endif
this->sock = ~0;
return;
}
if ((this->sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == INVALID_SOCKET)