summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-ir-any-value-marshalling.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/slang/slang-ir-any-value-marshalling.cpp b/source/slang/slang-ir-any-value-marshalling.cpp
index 0c603d81a..35e063848 100644
--- a/source/slang/slang-ir-any-value-marshalling.cpp
+++ b/source/slang/slang-ir-any-value-marshalling.cpp
@@ -387,7 +387,11 @@ namespace Slang
// Initialize fields to 0 to prevent downstream compiler error.
for (uint32_t offset = 0; offset < (uint32_t)anyValInfo->fieldKeys.getCount(); offset++)
{
- auto fieldAddr = builder.emitFieldAddress(builder.getUIntType(), resultVar, anyValInfo->fieldKeys[offset]);
+ auto fieldAddr = builder.emitFieldAddress(
+ builder.getPtrType(builder.getUIntType()),
+ resultVar,
+ anyValInfo->fieldKeys[offset]
+ );
builder.emitStore(fieldAddr, builder.getIntValue(builder.getUIntType(), 0));
}