mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 12:43:43 +00:00
Validate TileData enum range before using it as index
This commit is contained in:
parent
b9d544b404
commit
091d802692
@ -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) {
|
||||
ERR_FAIL_INDEX(p_peering_bit, TileSet::CellNeighbor::CELL_NEIGHBOR_MAX);
|
||||
ERR_FAIL_COND(terrain_set < 0);
|
||||
ERR_FAIL_COND(p_terrain_index < -1);
|
||||
if (tile_set) {
|
||||
|
Loading…
Reference in New Issue
Block a user