]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a C++ void pointer error
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 9 Aug 2010 17:29:15 +0000 (17:29 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 10 Aug 2010 06:35:39 +0000 (08:35 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10382 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2900b22335e9c5ff66cdba3c21ee9f471ea311a9

model_brush.c

index e2bccd88ef2175b7b6b8e37b84a52421ab0d3bd5..31b947732554975f065fe1601d3c4d66fa94e094 100644 (file)
@@ -7382,7 +7382,7 @@ void Mod_OBJ_Load(dp_model_t *mod, void *buffer, void *bufferend)
        loadmodel->num_surfaces = 0;
        // allocate storage for the worst case number of surfaces, later we resize
        tempsurfaces = (msurface_t *)Mem_Alloc(loadmodel->mempool, numtextures * loadmodel->brush.numsubmodels * sizeof(msurface_t));
-       submodelfirstsurface = Mem_Alloc(loadmodel->mempool, (loadmodel->brush.numsubmodels+1) * sizeof(int));
+       submodelfirstsurface = (int *)Mem_Alloc(loadmodel->mempool, (loadmodel->brush.numsubmodels+1) * sizeof(int));
        surface = tempsurfaces;
        for (submodelindex = 0;submodelindex < loadmodel->brush.numsubmodels;submodelindex++)
        {