diff --git a/noir/noir-repo/compiler/noirc_evaluator/src/brillig/brillig_ir/codegen_memory.rs b/noir/noir-repo/compiler/noirc_evaluator/src/brillig/brillig_ir/codegen_memory.rs index 112f9c908f9..69e7ff5383d 100644 --- a/noir/noir-repo/compiler/noirc_evaluator/src/brillig/brillig_ir/codegen_memory.rs +++ b/noir/noir-repo/compiler/noirc_evaluator/src/brillig/brillig_ir/codegen_memory.rs @@ -276,14 +276,14 @@ impl BrilligContext< let index_at_end_of_array = self.allocate_register(); let end_value_register = self.allocate_register(); - self.mov_instruction(index_at_end_of_array, vector.size); + self.mov_instruction(index_at_end_of_array, size); self.codegen_loop(iteration_count, |ctx, iterator_register| { // The index at the end of array is size - 1 - iterator ctx.codegen_usize_op_in_place(index_at_end_of_array, BrilligBinaryOp::Sub, 1); // Load both values - ctx.codegen_array_get(vector.pointer, iterator_register, start_value_register); + ctx.codegen_array_get(pointer, iterator_register, start_value_register); ctx.codegen_array_get( pointer, SingleAddrVariable::new_usize(index_at_end_of_array),