Skip to content

Commit

Permalink
Added check for invalid channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Zylann committed May 5, 2023
1 parent ba6c448 commit 8be549a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/voxel_buffer_gd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ VoxelBuffer::Depth VoxelBuffer::get_channel_depth(unsigned int channel_index) co
}

void VoxelBuffer::remap_values(unsigned int channel_index, PackedInt32Array map) {
ZN_ASSERT_RETURN(channel_index < MAX_CHANNELS);

Span<const int> map_r(map.ptr(), map.size());
const VoxelBufferInternal::Depth depth = _buffer->get_channel_depth(channel_index);

Expand Down

0 comments on commit 8be549a

Please sign in to comment.