mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Fix ZoneCode array loading overwriting pointers when an array is loaded while inside of an array of the same type
This commit is contained in:
parent
8778421ebb
commit
4aafbac113
@ -153,11 +153,13 @@ void $LoaderClassName(context.Asset)$::LoadPtrArray_$SafeTypeName(type)$(const b
|
||||
if(atStreamStart)
|
||||
m_stream->Load<$type.FullName$*>($TypePtrVarName(type)$, count);
|
||||
|
||||
$type.FullName$** var = $TypePtrVarName(type)$;
|
||||
for(size_t index = 0; index < count; index++)
|
||||
{
|
||||
$TypePtrVarName(type)$ = var;
|
||||
$LoadPointerArrayMethod_PointerCheck(context, type, structure, reusable)$
|
||||
|
||||
$TypePtrVarName(type)$++;
|
||||
var++;
|
||||
}
|
||||
}
|
||||
>>
|
@ -236,13 +236,16 @@ void $LoaderClassName(context.Asset)$::LoadArray_$type.Name$(const bool atStream
|
||||
if(atStreamStart)
|
||||
m_stream->Load<$type.FullName$>($TypeVarName(type)$, count);
|
||||
|
||||
$type.FullName$* var = $TypeVarName(type)$;
|
||||
for(size_t index = 0; index < count; index++)
|
||||
{
|
||||
$if(!type.Members)$
|
||||
$TypeVarName(structure.Type)$ = $TypeVarName(type)$;
|
||||
$TypeVarName(structure.Type)$ = var;
|
||||
$else$
|
||||
$TypeVarName(type)$ = var;
|
||||
$endif$
|
||||
Load_$structure.Type.Name$(false);
|
||||
$TypeVarName(type)$++;
|
||||
var++;
|
||||
}
|
||||
}
|
||||
>>
|
||||
|
Loading…
x
Reference in New Issue
Block a user