]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - lhnet.c
fix colormap checking in ValidateState, it was throwing out RENDER_COLORMAPPED colorm...
[xonotic/darkplaces.git] / lhnet.c
diff --git a/lhnet.c b/lhnet.c
index bc7f40172171069cc55c9275529ea1548e9b488a..ede0e7e2fd1c3032f101a5697680394e157f2e97 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -459,7 +459,12 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address)
                                        if (ioctl(lhnetsocket->inetsocket, FIONBIO, &_true) != -1)
 #endif
                                        {
-                                               socklen_t namelen = address->addresstype == LHNETADDRESSTYPE_INET6 ? sizeof(lhnetsocket->address.addressdata.inet6) : sizeof(lhnetsocket->address.addressdata.inet4);
+#ifdef WIN32
+                                               int namelen;
+#else
+                                               socklen_t namelen;
+#endif
+                                               namelen = address->addresstype == LHNETADDRESSTYPE_INET6 ? sizeof(lhnetsocket->address.addressdata.inet6) : sizeof(lhnetsocket->address.addressdata.inet4);
                                                if (bind(lhnetsocket->inetsocket, (void *)&lhnetsocket->address.addressdata, namelen) != -1)
                                                {
                                                        getsockname(lhnetsocket->inetsocket, (void *)&lhnetsocket->address.addressdata, &namelen);