[assimp] Make sure ctype calls use unsigned char.

Cast to unsigned char as required by C++ (see C++ **[cctype.cyn]** -> ISO C99 section 7.4, [see also](https://en.cppreference.com/w/cpp/string/byte/isspace)).

Addresses https://github.com/assimp/assimp/issues/3867 and then some.
This commit is contained in:
Jason C
2021-05-04 04:55:08 -04:00
committed by Jason C
parent f17d58cadd
commit 2925592c64
13 changed files with 23 additions and 23 deletions

View File

@@ -69,7 +69,7 @@ void Discreet3DSImporter::ReplaceDefaultMaterial() {
for (unsigned int i = 0; i < mScene->mMaterials.size(); ++i) {
std::string s = mScene->mMaterials[i].mName;
for (std::string::iterator it = s.begin(); it != s.end(); ++it) {
*it = static_cast<char>(::tolower(*it));
*it = static_cast<char>(::tolower(static_cast<unsigned char>(*it)));
}
if (std::string::npos == s.find("default")) continue;