mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Initialize variables
This commit is contained in:
@@ -595,7 +595,7 @@ BOOLEAN LBENODE::Load( HWFILE hFile )
|
|||||||
//when combined with copy assignment which makes a new LBENODE
|
//when combined with copy assignment which makes a new LBENODE
|
||||||
gLastLBEUniqueID = uniqueID + 1;
|
gLastLBEUniqueID = uniqueID + 1;
|
||||||
}
|
}
|
||||||
int size;
|
int size = 0;
|
||||||
if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) )
|
if ( !FileRead( hFile, &size, sizeof(int), &uiNumBytesRead ) )
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
@@ -671,7 +671,7 @@ static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
|||||||
|
|
||||||
if (guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE)
|
if (guiCurrentSaveGameVersion >= NIV_SAVEGAME_DATATYPE_CHANGE)
|
||||||
{
|
{
|
||||||
int dealers;
|
int dealers = 0;
|
||||||
if (!FileRead( hFile, &dealers, sizeof( int ), &uiNumBytesRead ))
|
if (!FileRead( hFile, &dealers, sizeof( int ), &uiNumBytesRead ))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
@@ -699,7 +699,7 @@ static BOOLEAN LoadArmsDealerInventoryFromSavedGameFile( HWFILE hFile )
|
|||||||
//loop through all the dealers inventories
|
//loop through all the dealers inventories
|
||||||
for( ubArmsDealer=0; ubArmsDealer<dealers; ++ubArmsDealer )
|
for( ubArmsDealer=0; ubArmsDealer<dealers; ++ubArmsDealer )
|
||||||
{
|
{
|
||||||
int size;
|
int size = 0;
|
||||||
if (!FileRead( hFile, &size, sizeof( int ), &uiNumBytesRead ))
|
if (!FileRead( hFile, &size, sizeof( int ), &uiNumBytesRead ))
|
||||||
{
|
{
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
@@ -1440,7 +1440,7 @@ BOOLEAN MERCPROFILESTRUCT::Load(HWFILE hFile, bool forceLoadOldVersion, bool for
|
|||||||
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
|
numBytesRead = ReadFieldByField(hFile, &filler, sizeof(filler), sizeof(UINT8), numBytesRead);
|
||||||
|
|
||||||
//DBrot: More rooms
|
//DBrot: More rooms
|
||||||
int size;
|
int size = 0;
|
||||||
if ( numBytesRead + buffer != SIZEOF_MERCPROFILESTRUCT_POD )
|
if ( numBytesRead + buffer != SIZEOF_MERCPROFILESTRUCT_POD )
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|||||||
Reference in New Issue
Block a user