From 181ac3ec1a6a9224b36906de675b7aa2b3641cb2 Mon Sep 17 00:00:00 2001 From: David Mak Date: Tue, 11 Jun 2024 15:12:32 +0800 Subject: [PATCH] core/classes: Fix incorrect pointers of range.{stop,step} --- nac3core/src/codegen/classes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nac3core/src/codegen/classes.rs b/nac3core/src/codegen/classes.rs index a3f35c663..b2204a2e9 100644 --- a/nac3core/src/codegen/classes.rs +++ b/nac3core/src/codegen/classes.rs @@ -890,7 +890,7 @@ impl<'ctx> RangeValue<'ctx> { ) { debug_assert_eq!(end.get_type().get_bit_width(), 32); - let pend = self.ptr_to_start(ctx); + let pend = self.ptr_to_end(ctx); ctx.builder.build_store(pend, end).unwrap(); } @@ -915,7 +915,7 @@ impl<'ctx> RangeValue<'ctx> { ) { debug_assert_eq!(step.get_type().get_bit_width(), 32); - let pstep = self.ptr_to_start(ctx); + let pstep = self.ptr_to_step(ctx); ctx.builder.build_store(pstep, step).unwrap(); }