bspDrawSurfaces = safe_malloc_info( sizeof( bspDrawSurface_t ) * numBSPDrawSurfacesBuffer, "IncDrawSurfaces" );
- memset( bspDrawSurfaces, 0, MAX_MAP_DRAW_SURFS * sizeof( bspDrawVert_t ) );
+ memset( bspDrawSurfaces, 0, MAX_MAP_DRAW_SURFS * sizeof( bspDrawSurface_t ) );
}
void SetDrawSurfaces( int n ){
bspDrawSurfaces = safe_malloc_info( sizeof( bspDrawSurface_t ) * numBSPDrawSurfacesBuffer, "IncDrawSurfaces" );
- memset( bspDrawSurfaces, 0, n * sizeof( bspDrawVert_t ) );
+ memset( bspDrawSurfaces, 0, n * sizeof( bspDrawSurface_t ) );
}
void BSPFilesCleanup(){
ClearBounds( ds->mins, ds->maxs );
/* clear verts/indexes */
- memset( verts, 0, sizeof( verts ) );
- memset( indexes, 0, sizeof( indexes ) );
+ memset( verts, 0, sizeof( *verts ) * maxSurfaceVerts );
+ memset( indexes, 0, sizeof( *indexes ) * maxSurfaceIndexes );
/* add the first triangle */
if ( AddMetaTriangleToSurface( ds, seed, qfalse ) ) {