From 5b2c78b9ff39a392c75a31be5a548b7e092f5af5 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Sun, 13 May 2012 02:52:12 +0200 Subject: [PATCH] Fix wrong length used in memset() in idMegaTexture::GenerateMegaMipMaps() it should be tileSize, not sizeof( tileSize ), as it was also used for allocating that block of memory --- neo/renderer/MegaTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/renderer/MegaTexture.cpp b/neo/renderer/MegaTexture.cpp index 38a5e916..17cf714e 100644 --- a/neo/renderer/MegaTexture.cpp +++ b/neo/renderer/MegaTexture.cpp @@ -540,7 +540,7 @@ void idMegaTexture::GenerateMegaMipMaps( megaTextureHeader_t *header, idFile *ou if ( tx > width || ty > height ) { // off edge, zero fill - memset( newBlock, 0, sizeof( tileSize ) ); + memset( newBlock, 0, tileSize ); } else { tileNum = tileOffset + ty * width + tx; inFile->Seek( tileNum * tileSize, FS_SEEK_SET );