From a3d04c9cececaa70815b1feb784905ef422b266f Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 6 Oct 2005 14:12:00 +0000 Subject: [PATCH] ok this did not cause memory corruption because of another bug which wasted an equivilant amount of memory... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5730 d7cf8633-e32d-0410-b094-e92efae38249 --- model_shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_shared.c b/model_shared.c index c7743ae4..684be276 100644 --- a/model_shared.c +++ b/model_shared.c @@ -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); -- 2.39.2