]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
open client sockets before video starts, so that the Windows Firewall
[xonotic/darkplaces.git] / gl_rsurf.c
index 21f5e4c50b8a2424dcb60d9f07b728f0c482957c..cbab40d45d30aea1794be85a4342e3b5d79ff287 100644 (file)
@@ -216,7 +216,7 @@ loc0:
                        s = bound(0, impacts, smax * 16) - impacts;
                        t = bound(0, impactt, tmax * 16) - impactt;
                        i = (int)(s * s + t * t + dist2);
-                       if (i > maxdist)
+                       if ((i > maxdist) || (smax > (int)(sizeof(sdtable)/sizeof(sdtable[0])))) // smax overflow fix from Andreas Dehmel
                                continue;
 
                        // reduce calculations