Fix warning in MSVC

(cherry picked from commit fe8c217b7c)
This commit is contained in:
Pedro J. Estébanez 2023-12-27 17:50:45 +01:00 committed by Rémi Verschelde
parent e1421715e8
commit 664b2502d2
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i
for (int m_i = 0; m_i < mesh_instances.size(); m_i++) {
if (p_step_function) {
float p = float(m_i + 1) / mesh_instances.size() * 0.1;
float p = float(m_i + 1) / MAX(1, mesh_instances.size()) * 0.1;
p_step_function(0.3 + p, vformat(RTR("Plotting mesh into acceleration structure %d/%d"), m_i + 1, mesh_instances.size()), p_bake_userdata, false);
}