Fixed bad position validation in VoxelBuffer

This commit is contained in:
Marc Gilleron 2019-04-26 02:52:32 +01:00
parent beace8709b
commit b85e696b7b

View File

@ -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 {