summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-08 11:16:38 +0100
committerGitHub <noreply@github.com>2019-02-08 11:16:38 +0100
commit952340319297706763284c9bbe8d7a57cc4f380a (patch)
tree496245c12cf75be90fc427306d4d3d3741b285f0
parentaa9ec210b9b878f7cfe093ba82715b0a247129b3 (diff)
parentabfeba8d123a4a1653a03c0387fd0335219fe428 (diff)
Merge pull request #25509 from bojidar-bg/25504-update-bitmask-crash
Fix crashes when calling update_bitmask_area
-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 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()];
}
}