]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_brush.c
Added the proper libPNG DLL name for Win64, by Willis
[xonotic/darkplaces.git] / model_brush.c
index a30968237acdf4b2b7bd90cf1da940375923248b..f37de5b392c5775600baa3c23213d1e3084c7210 100644 (file)
@@ -1758,6 +1758,12 @@ static void Mod_Q1BSP_LoadEdges(lump_t *l)
        {
                out->v[0] = (unsigned short)LittleShort(in->v[0]);
                out->v[1] = (unsigned short)LittleShort(in->v[1]);
+               if (out->v[0] >= loadmodel->brushq1.numvertexes || out->v[1] >= loadmodel->brushq1.numvertexes)
+               {
+                       Host_Error("Mod_Q1BSP_LoadEdges: %s has invalid vertex indices in edge %i (vertices %i %i >= numvertices %i)\n", loadmodel->name, i, out->v[0], out->v[1], loadmodel->brushq1.numvertexes);
+                       out->v[0] = 0;
+                       out->v[1] = 0;
+               }
        }
 }