Skip to content

Commit

Permalink
Fix buffer access
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Oct 30, 2024
1 parent ec67b67 commit 9e6a953
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/geoarrow/src/scalar/coord/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ 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 {
self.buffer.buffers[0][self.i * self.buffer.coords_stride]
}

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]
}
}

0 comments on commit 9e6a953

Please sign in to comment.