Fix bug in navmesh tool caused by transforming string

Value passed into 'std::tolower' must be unsigned.
This commit is contained in:
Kawe Mazidjatari 2023-04-03 14:50:30 +02:00
parent 5551909ac7
commit a79ed2f52f

View File

@ -341,7 +341,8 @@ bool InputGeom::load(rcContext* ctx, const std::string& filepath)
return false;
std::string extension = filepath.substr(extensionPos);
std::transform(extension.begin(), extension.end(), extension.begin(), tolower);
std::transform(extension.begin(), extension.end(), extension.begin(),
[](unsigned char c) { return char(std::tolower(c)); });
if (extension == ".gset")
return loadGeomSet(ctx, filepath);