diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-01-31 11:48:37 +0200 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-01-31 11:48:37 +0200 |
commit | abfeba8d123a4a1653a03c0387fd0335219fe428 (patch) | |
tree | e55ffec0adbd9f7c41124c394206e70992b8e241 /scene/resources | |
parent | 35bb52011a4cbcd8ca3779ab1761244f06a33127 (diff) |
Fix crashes when calling update_bitmask_area
Fixes #25504
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/tile_set.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 5a2e7245a2..3c83de91fd 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -614,7 +614,7 @@ Vector2 TileSet::autotile_get_subtile_for_bitmask(int p_id, uint16_t p_bitmask, if (coords.size() == 0) { return autotile_get_icon_coordinate(p_id); } else { - return coords[Math::random(0, (int)coords.size())]; + return coords[Math::rand() % coords.size()]; } } |