Fix wrong usage of memset()

This commit is contained in:
dhewg 2011-12-08 01:00:23 +01:00
parent 8d12d9af4f
commit bdb21d20c8
3 changed files with 3 additions and 3 deletions

View file

@ -538,7 +538,7 @@ void idMegaTexture::GenerateMegaMipMaps( megaTextureHeader_t *header, idFile *ou
if ( tx > width || ty > height ) {
// off edge, zero fill
memset( newBlock, 0, sizeof( newBlock ) );
memset( newBlock, 0, sizeof( tileSize ) );
} else {
tileNum = tileOffset + ty * width + tx;
inFile->Seek( tileNum * tileSize, FS_SEEK_SET );

View file

@ -174,7 +174,7 @@ void Sys_GetCurrentMemoryStatus( sysMemoryStats_t &stats ) {
MEMORYSTATUSEX statex;
unsigned __int64 work;
memset( &statex, sizeof( statex ), 0 );
memset( &statex, 0, sizeof( statex ) );
statex.dwLength = sizeof( statex );
GlobalMemoryStatusEx( &statex );

View file

@ -1309,6 +1309,6 @@ void idAASFileLocal::DeleteClusters( void ) {
portals.Append( portal );
// first cluster is a dummy
memset( &cluster, 0, sizeof( portal ) );
memset( &cluster, 0, sizeof( cluster ) );
clusters.Append( cluster );
}