From 9e6a9538aeaef234e389fdf8cc34f52d1346eaee Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Wed, 30 Oct 2024 00:23:40 -0400 Subject: [PATCH] Fix buffer access --- rust/geoarrow/src/scalar/coord/scalar.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/geoarrow/src/scalar/coord/scalar.rs b/rust/geoarrow/src/scalar/coord/scalar.rs index 62e00208..39261951 100644 --- a/rust/geoarrow/src/scalar/coord/scalar.rs +++ b/rust/geoarrow/src/scalar/coord/scalar.rs @@ -25,7 +25,7 @@ impl<'a> CoordTrait for Coord<'a> { } fn nth_unchecked(&self, n: usize) -> Self::T { - self.buffer.buffers[n][self.i * self.buffer.coords_stride] + self.buffer.buffers[n][self.i * self.buffer.coords_stride + n] } fn x(&self) -> Self::T { @@ -33,6 +33,6 @@ impl<'a> CoordTrait for Coord<'a> { } fn y(&self) -> Self::T { - self.buffer.buffers[1][self.i * self.buffer.coords_stride] + self.buffer.buffers[1][self.i * self.buffer.coords_stride + 1] } }