Skip to content

Commit

Permalink
fix: not properly handling array of indirect asset ref pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
Laupetin committed Feb 7, 2024
1 parent 54c37c3 commit d3d7f1b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ZoneCodeGeneratorLib/Generating/Templates/ZoneMarkTemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,16 @@ class ZoneMarkTemplate::Internal final : BaseTemplate
{
if (loadType == MemberLoadType::POINTER_ARRAY)
{
LINE("MarkArray_IndirectAssetRef(" << member->m_asset_ref->m_name << ", " << MakeMemberAccess(info, member, modifier) << ", "
<< MakeEvaluation(modifier.GetArrayPointerCountEvaluation()) << ");")
if (modifier.IsArray())
{
LINE("MarkArray_IndirectAssetRef(" << member->m_asset_ref->m_name << ", " << MakeMemberAccess(info, member, modifier) << ", "
<< modifier.GetArraySize() << ");")
}
else
{
LINE("MarkArray_IndirectAssetRef(" << member->m_asset_ref->m_name << ", " << MakeMemberAccess(info, member, modifier) << ", "
<< MakeEvaluation(modifier.GetPointerArrayCountEvaluation()) << ");")
}
}
else if (loadType == MemberLoadType::SINGLE_POINTER)
{
Expand Down

0 comments on commit d3d7f1b

Please sign in to comment.