From b85e696b7baa47e353bb2ba4351f404e97232ceb Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Fri, 26 Apr 2019 02:52:32 +0100 Subject: [PATCH] Fixed bad position validation in VoxelBuffer --- voxel_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/voxel_buffer.h b/voxel_buffer.h index b428c2e..0a192be 100644 --- a/voxel_buffer.h +++ b/voxel_buffer.h @@ -83,7 +83,7 @@ public: void copy_from(const VoxelBuffer &other, Vector3i src_min, Vector3i src_max, Vector3i dst_min, unsigned int channel_index = 0); _FORCE_INLINE_ bool validate_pos(unsigned int x, unsigned int y, unsigned int z) const { - return x < _size.x && y < _size.y && z < _size.x; + return x < _size.x && y < _size.y && z < _size.z; } _FORCE_INLINE_ unsigned int index(unsigned int x, unsigned int y, unsigned int z) const {