diff --git a/crates/wasmi/src/engine/cache.rs b/crates/wasmi/src/engine/cache.rs index 06facfae94..af48e9d70e 100644 --- a/crates/wasmi/src/engine/cache.rs +++ b/crates/wasmi/src/engine/cache.rs @@ -200,7 +200,7 @@ impl InstanceCache { fn load_default_memory_bytes(&mut self, ctx: &mut StoreInner) -> &mut NonNull<[u8]> { let memory = *self.default_memory(ctx); self.default_memory_bytes - .insert(ctx.resolve_memory_mut(&memory).data().into()) + .insert(ctx.resolve_memory_mut(&memory).data_mut().into()) } /// Clears the cached default memory instance.