mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: memset bugs (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9275 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -27,7 +27,8 @@ std::vector<MILITIA> gIndividualMilitiaVector;
|
||||
|
||||
MILITIA::MILITIA()
|
||||
{
|
||||
memset( this, 0, sizeof(MILITIA) );
|
||||
memset( this, 0, sizeof(SIZEOF_MILITIA_POD) );
|
||||
this->history.clear();
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
||||
@@ -58,8 +58,7 @@ struct
|
||||
UINT32 curIndex;
|
||||
UINT32 currentDepth;
|
||||
UINT32 maxReadDepth;
|
||||
}
|
||||
typedef facilitytypeParseData;
|
||||
} typedef facilitytypeParseData;
|
||||
|
||||
BOOLEAN FacilityTypes_TextOnly;
|
||||
|
||||
@@ -173,8 +172,6 @@ facilitytypeStartElementHandle(void *userData, const XML_Char *name, const XML_C
|
||||
{
|
||||
pData->curElement = FACILITYTYPE_TYPE;
|
||||
|
||||
memset( &pData->curFacilityTypeData, 0, sizeof(FACILITYTYPE) );
|
||||
|
||||
// Set all values to default before applying XML data
|
||||
InitFacilityTypeEntry( pData );
|
||||
|
||||
@@ -1306,7 +1303,6 @@ BOOLEAN ReadInFacilityTypes(STR fileName, BOOLEAN localizedVersion)
|
||||
XML_SetCharacterDataHandler(parser, facilitytypeCharacterDataHandle);
|
||||
|
||||
|
||||
memset(&pData,0,sizeof(pData));
|
||||
pData.maxArraySize = MAXITEMS;
|
||||
pData.curIndex = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user