Merge pull request #25509 from bojidar-bg/25504-update-bitmask-crash

Fix crashes when calling update_bitmask_area
This commit is contained in:
Rémi Verschelde 2019-02-08 11:16:38 +01:00 committed by GitHub
commit 9523403192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()];
}
}