1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-25 12:41:01 +00:00

Merge branch 'bug-fix-7105' into 'master'

Use a wider type when converting to a signed type

Closes #7105

See merge request OpenMW/openmw!2543
This commit is contained in:
psi29a 2022-12-19 07:19:00 +00:00
commit 7662fee47d

View File

@ -199,10 +199,10 @@ std::string Misc::ResourceHelpers::getLODMeshName(
return ""; return "";
} }
}(); }();
for (char l = lod; l >= 0; --l) for (int l = lod; l >= 0; --l)
{ {
std::stringstream patern; std::stringstream patern;
patern << distantMeshPattern << "_" << int(l); patern << distantMeshPattern << "_" << l;
std::string const meshName = getBestLODMeshName(resPath, vfs, patern.str()); std::string const meshName = getBestLODMeshName(resPath, vfs, patern.str());
if (meshName != resPath) if (meshName != resPath)
return meshName; return meshName;