diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp index 13d5c9699f3..0323be62cab 100644 --- a/scene/resources/world_2d.cpp +++ b/scene/resources/world_2d.cpp @@ -228,7 +228,7 @@ struct SpatialIndexer2D { List added; List removed; - int visible_cells = (end.x - begin.x) * (end.y - begin.y); + uint64_t visible_cells = (uint64_t)(end.x - begin.x) * (uint64_t)(end.y - begin.y); if (visible_cells > 10000) {