From ec6401ee5daa31142cf7f255dec9eea46941ef8e Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Sun, 23 Nov 2025 14:03:53 +0200 Subject: [PATCH] Initialize variables --- Ja2/SaveLoadGame.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Ja2/SaveLoadGame.cpp b/Ja2/SaveLoadGame.cpp index 98c204bf..a28e812b 100644 --- a/Ja2/SaveLoadGame.cpp +++ b/Ja2/SaveLoadGame.cpp @@ -595,7 +595,7 @@ BOOLEAN LBENODE::Load( HWFILE hFile ) //when combined with copy assignment which makes a new LBENODE gLastLBEUniqueID = uniqueID + 1; } - int size; + int size = 0; if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) ) { return(FALSE); @@ -671,7 +671,7 @@ static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile ) if (guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE) { - int dealers; + int dealers = 0; if (!FileRead( hFile, &dealers, sizeof( int ), &uiNumBytesRead )) { return( FALSE ); @@ -699,7 +699,7 @@ static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile ) //loop through all the dealers inventories for( ubArmsDealer=0; ubArmsDealer