]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - lhnet.c
add bih.[ch] to MSVC projects
[xonotic/darkplaces.git] / lhnet.c
diff --git a/lhnet.c b/lhnet.c
index 3ee6267d729802dc65bbd973adf7445ae89a52ed..5d60a213c8d59bbd57f212d8e2a2597db1859215 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -124,7 +124,7 @@ int LHNETADDRESS_FromPort(lhnetaddress_t *vaddress, lhnetaddresstype_t addressty
        switch(addresstype)
        {
        default:
-               return 0;
+               break;
        case LHNETADDRESSTYPE_LOOP:
                // local:port  (loopback)
                memset(address, 0, sizeof(*address));
@@ -1088,7 +1088,7 @@ int LHNET_Read(lhnetsocket_t *lhnetsocket, void *content, int maxcontentlength,
                        address->port = ntohs(address->addr.in.sin_port);
                        return value;
                }
-               else if (value == -1)
+               else if (value < 0)
                {
                        int e = SOCKETERRNO;
                        if (e == EWOULDBLOCK)