Explorar el Código

Fixed WSASend returning 1 instead of -1 on error.

Fixed WSASend returning 1 instead of -1 on error.
Bug found by @c6burns
Maxim hace 5 años
padre
commit
3f66b5d825
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      include/enet.h

+ 1 - 1
include/enet.h

@@ -5740,7 +5740,7 @@ extern "C" {
             NULL,
             NULL) == SOCKET_ERROR
         ) {
-            return (WSAGetLastError() == WSAEWOULDBLOCK) ? 0 : 1;
+            return (WSAGetLastError() == WSAEWOULDBLOCK) ? 0 : -1;
         }
 
         return (int) sentLength;