[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

@@ -667,8 +667,8 @@ void XFileImporter::ConvertMaterials( aiScene* pScene, std::vector<XFile::Materi
// convert to lower case for easier comparison
for ( unsigned int c = 0; c < sz.length(); ++c ) {
if ( isalpha( sz[ c ] ) ) {
sz[ c ] = (char) tolower( sz[ c ] );
if ( isalpha( (unsigned char) sz[ c ] ) ) {
sz[ c ] = (char) tolower( (unsigned char) sz[ c ] );
}
}