mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Merge pull request #364 from tkoeppe/memsize
[tools/quake3/q3map2] Fix memset size bugs
This commit is contained in:
commit
28e9b8ec59
2 changed files with 4 additions and 4 deletions
|
@ -113,7 +113,7 @@ void SetDrawSurfacesBuffer(){
|
|||
|
||||
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 ){
|
||||
|
@ -126,7 +126,7 @@ 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(){
|
||||
|
|
|
@ -1467,8 +1467,8 @@ static void MetaTrianglesToSurface( int numPossibles, metaTriangle_t *possibles,
|
|||
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 ) ) {
|
||||
|
|
Loading…
Reference in a new issue