From d3d7f1b6e5275dd2e3090de5e314aa16b6527bff Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 7 Feb 2024 01:27:54 +0100 Subject: [PATCH] fix: not properly handling array of indirect asset ref pointers --- .../Generating/Templates/ZoneMarkTemplate.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneMarkTemplate.cpp b/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneMarkTemplate.cpp index 0a62f1a4c..ae5b8c393 100644 --- a/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneMarkTemplate.cpp +++ b/src/ZoneCodeGeneratorLib/Generating/Templates/ZoneMarkTemplate.cpp @@ -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) {