summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorNathan Franke <me@nathan.sh>2022-05-25 11:39:00 -0500
committerNathan Franke <me@nathan.sh>2022-05-25 13:36:45 -0500
commit77c8f271e7ca8ab6374abdc7470d6a6f6afa18d4 (patch)
treeb2894e8a5125cf7fc04adbdbd7fc66f69cc867be /scene
parent410b6b5f7d23638997aa7de3faf3b382c95e7fc3 (diff)
use ERR_FAIL_INDEX when preferred
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/tile_set.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 1b1107d79e..9d2d4cdb20 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -281,7 +281,7 @@ void TileSet::TerrainsPattern::set_terrains_from_array(Array p_terrains) {
int in_array_index = 0;
for (int i = 0; i < TileSet::CELL_NEIGHBOR_MAX; i++) {
if (is_valid_bit[i]) {
- ERR_FAIL_COND(in_array_index >= p_terrains.size());
+ ERR_FAIL_INDEX(in_array_index, p_terrains.size());
set_terrain(TileSet::CellNeighbor(i), p_terrains[in_array_index]);
in_array_index++;
}