game: init uninitialized variables

This commit is contained in:
nillerusr
2022-05-01 20:09:55 +03:00
parent 61cd8d0afc
commit 600695b15f
17 changed files with 37 additions and 56 deletions
+1 -1
View File
@@ -931,7 +931,7 @@ void CViewRender::WriteSaveGameScreenshotOfSize( const char *pFilename, int widt
{
// Write TGA format to buffer
int iMaxTGASize = 1024 + ( nSrcWidth * nSrcHeight * 4 );
void *pTGA = malloc( iMaxTGASize );
void *pTGA = new char[ iMaxTGASize ];
buffer.SetExternalBuffer( pTGA, iMaxTGASize, 0 );
bWriteResult = TGAWriter::WriteToBuffer( pSrcImage, buffer, nSrcWidth, nSrcHeight, IMAGE_FORMAT_RGB888, IMAGE_FORMAT_RGB888 );