mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix: incorrect initialization (by serg).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9012 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -39,7 +39,9 @@ drugsStartElementHandle(void *userData, const XML_Char *name, const XML_Char **a
|
||||
{
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
|
||||
memset(pData->curArray,0,sizeof(DRUG)*pData->maxArraySize);
|
||||
for (UINT32 i = 0; i < pData->maxArraySize; ++i) {
|
||||
pData->curArray[i] = DRUG{};
|
||||
}
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
|
||||
@@ -42,8 +42,9 @@ militiaindividualStartElementHandle( void *userData, const XML_Char *name, const
|
||||
{
|
||||
pData->curElement = ELEMENT_LIST;
|
||||
|
||||
if ( !localizedTextOnly_MI )
|
||||
memset( pData->curArray, 0, sizeof(MilitiaOriginData)*pData->maxArraySize );
|
||||
for (UINT32 i = 0; i < pData->maxArraySize; ++i) {
|
||||
pData->curArray[i] = MilitiaOriginData{};
|
||||
}
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
@@ -52,7 +53,7 @@ militiaindividualStartElementHandle( void *userData, const XML_Char *name, const
|
||||
pData->curElement = ELEMENT;
|
||||
|
||||
if ( !localizedTextOnly_MI )
|
||||
memset( &pData->curBackground, 0, sizeof(MilitiaOriginData) );
|
||||
pData->curBackground = MilitiaOriginData{};
|
||||
|
||||
pData->maxReadDepth++; //we are not skipping this element
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user