From 7627888256b72df38d24d1e50a6b13d437ebe35b Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Sat, 16 Mar 2024 17:16:55 +0100 Subject: [PATCH] Fix `loadData` call during state initialization (#469) * Fix loadData call during state initialization * fix --- src/vm/runners/cairo_runner.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vm/runners/cairo_runner.zig b/src/vm/runners/cairo_runner.zig index 38ebbfdf..8e161301 100644 --- a/src/vm/runners/cairo_runner.zig +++ b/src/vm/runners/cairo_runner.zig @@ -347,10 +347,9 @@ pub const CairoRunner = struct { self.initial_pc = try pb.addInt(@intCast(entrypoint)); // Load program data into the program base segment. - _ = self.vm.segments.loadData( - self.allocator, + _ = self.vm.loadData( pb, - self.program.shared_program_data.data.items, + &self.program.shared_program_data.data, ) catch return RunnerError.MemoryInitializationError; // Mark memory addresses in the program base segment as accessed.