Fix crashes when calling update_bitmask_area

Fixes #25504
This commit is contained in:
Bojidar Marinov 2019-01-31 11:48:37 +02:00
parent 35bb52011a
commit abfeba8d12
No known key found for this signature in database
GPG Key ID: 4B0FD31949AD430D
1 changed files with 1 additions and 1 deletions

View File

@ -614,7 +614,7 @@ Vector2 TileSet::autotile_get_subtile_for_bitmask(int p_id, uint16_t p_bitmask,
if (coords.size() == 0) { if (coords.size() == 0) {
return autotile_get_icon_coordinate(p_id); return autotile_get_icon_coordinate(p_id);
} else { } else {
return coords[Math::random(0, (int)coords.size())]; return coords[Math::rand() % coords.size()];
} }
} }