]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
ok this did not cause memory corruption because of another bug which wasted an equivi...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 6 Oct 2005 14:12:00 +0000 (14:12 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 6 Oct 2005 14:12:00 +0000 (14:12 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5730 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index c7743ae476e6b8d9ecd72c654a15d4f13f2899f5..684be2765c4851aeee7ebcbb384406bb15b6bf1f 100644 (file)
@@ -636,7 +636,7 @@ surfmesh_t *Mod_AllocSurfMesh(mempool_t *mempool, int numvertices, int numtriang
 {
        surfmesh_t *mesh;
        qbyte *data;
-       mesh = Mem_Alloc(mempool, sizeof(surfmesh_t) + numvertices * (3 + 3 + 3 + 3 + 2 + 2 + (vertexcolors ? 4 : 0)) * sizeof(float) + numvertices * (lightmapoffsets ? 1 : 0) * sizeof(int) + numtriangles * (3 + 3 + (neighbors ? 3 : 0)) * sizeof(int));
+       mesh = Mem_Alloc(mempool, sizeof(surfmesh_t) + numvertices * (3 + 3 + 3 + 3 + 2 + 2 + (vertexcolors ? 4 : 0)) * sizeof(float) + numvertices * (lightmapoffsets ? 1 : 0) * sizeof(int) + numtriangles * (3 + (neighbors ? 3 : 0)) * sizeof(int));
        mesh->num_vertices = numvertices;
        mesh->num_triangles = numtriangles;
        data = (qbyte *)(mesh + 1);