Validate TileData enum range before using it as index
This commit is contained in:
parent
b9d544b404
commit
091d802692
1 changed files with 1 additions and 0 deletions
|
@ -3817,6 +3817,7 @@ int TileData::get_terrain_set() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TileData::set_peering_bit_terrain(TileSet::CellNeighbor p_peering_bit, int p_terrain_index) {
|
void TileData::set_peering_bit_terrain(TileSet::CellNeighbor p_peering_bit, int p_terrain_index) {
|
||||||
|
ERR_FAIL_INDEX(p_peering_bit, TileSet::CellNeighbor::CELL_NEIGHBOR_MAX);
|
||||||
ERR_FAIL_COND(terrain_set < 0);
|
ERR_FAIL_COND(terrain_set < 0);
|
||||||
ERR_FAIL_COND(p_terrain_index < -1);
|
ERR_FAIL_COND(p_terrain_index < -1);
|
||||||
if (tile_set) {
|
if (tile_set) {
|
||||||
|
|
Loading…
Reference in a new issue