windows: accept() socket handle could theoretically be 0

This commit is contained in:
Tobias Brunner 2014-07-02 11:54:40 +02:00
parent babe9e4f45
commit 0026600bfe
1 changed files with 1 additions and 1 deletions

View File

@ -230,7 +230,7 @@ int socketpair(int domain, int type, int protocol, int sv[2])
connect(c, (struct sockaddr*)&addr, sizeof(addr)) == 0)
{
sc = accept(s, NULL, NULL);
if (sc > 0)
if (sc >= 0)
{
closesocket(s);
s = sc;