diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/MemoryPacking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/MemoryPacking.cpp b/src/passes/MemoryPacking.cpp index 608bc1af2..5178db3ac 100644 --- a/src/passes/MemoryPacking.cpp +++ b/src/passes/MemoryPacking.cpp @@ -701,7 +701,7 @@ void MemoryPacking::createReplacements(Module* module, // Calculate dest, either as a const or as an addition to the dest local Expression* dest; - Type ptrType = init->dest->type; + Type ptrType = module->getMemory(init->memory)->indexType; if (auto* c = init->dest->dynCast<Const>()) { dest = builder.makeConstPtr(c->value.getInteger() + bytesWritten, ptrType); |