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 {