]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix for really dumb mistake (missing memset) in Mod_SplitSurfMeshIfTooBig
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 May 2002 01:30:53 +0000 (01:30 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 May 2002 01:30:53 +0000 (01:30 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1852 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 5aecaa77587a1d5203d0a2fed89a23e94b5be4d9..be7c3067c9aa9977f641b3311a9ccb3a8652cae9 100644 (file)
@@ -1239,7 +1239,6 @@ static void Mod_SplitSurfMeshIfTooBig(msurface_t *s)
        if (s->mesh->numtriangles > 1000)
        {
                vertexremap = Mem_Alloc(tempmempool, s->mesh->numverts * sizeof(int));
-               memset(vertexremap, -1, s->mesh->numverts * sizeof(int));
                base = 0;
                oldmesh = NULL;
                firstmesh = NULL;
@@ -1253,6 +1252,7 @@ static void Mod_SplitSurfMeshIfTooBig(msurface_t *s)
                        base += tricount;
 
                        newvertexcount = 0;
+                       memset(vertexremap, -1, s->mesh->numverts * sizeof(int));
                        for (j = 0;j < tricount * 3;j++)
                                if (vertexremap[index[j]] < 0)
                                        vertexremap[index[j]] = newvertexcount++;