mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Fix game crashing if DLC has XMLVERSION paramater
This commit is contained in:
parent
43d520f692
commit
92ac6147a1
|
|
@ -400,6 +400,7 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD
|
|||
unsigned int uiParameterCount=*(unsigned int *)&pbData[uiCurrentByte];
|
||||
uiCurrentByte+=sizeof(int);
|
||||
C4JStorage::DLC_FILE_PARAM *pParams = (C4JStorage::DLC_FILE_PARAM *)&pbData[uiCurrentByte];
|
||||
bool bXMLVersion = false;
|
||||
//DWORD dwwchCount=0;
|
||||
for(unsigned int i=0;i<uiParameterCount;i++)
|
||||
{
|
||||
|
|
@ -410,11 +411,22 @@ bool DLCManager::processDLCDataFile(DWORD &dwFilesProcessed, PBYTE pbData, DWORD
|
|||
{
|
||||
parameterMapping[pParams->dwType] = type;
|
||||
}
|
||||
|
||||
if (parameterName == L"XMLVERSION")
|
||||
{
|
||||
bXMLVersion = true;
|
||||
}
|
||||
|
||||
uiCurrentByte+= sizeof(C4JStorage::DLC_FILE_PARAM)+(pParams->dwWchCount*sizeof(WCHAR));
|
||||
pParams = (C4JStorage::DLC_FILE_PARAM *)&pbData[uiCurrentByte];
|
||||
}
|
||||
//ulCurrentByte+=ulParameterCount * sizeof(C4JStorage::DLC_FILE_PARAM);
|
||||
|
||||
if (bXMLVersion)
|
||||
{
|
||||
uiCurrentByte += sizeof(int);
|
||||
}
|
||||
|
||||
unsigned int uiFileCount=*(unsigned int *)&pbData[uiCurrentByte];
|
||||
uiCurrentByte+=sizeof(int);
|
||||
C4JStorage::DLC_FILE_DETAILS *pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];
|
||||
|
|
|
|||
Loading…
Reference in a new issue