[assimp_view] Make sure ctype calls use unsigned char.

Addresses https://github.com/assimp/assimp/issues/3867 and then some.
pull/3880/head
Jason C 2021-05-04 17:26:17 -04:00
parent 7dd7a053a9
commit 200086c4c5
1 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,7 @@ bool CMaterialManager::TryLongerPath(char* szTemp,aiString* p_szString)
szExtFound - 1 - info.cFileName);
for (unsigned int i = 0; i < iSizeFound;++i)
info.cFileName[i] = (CHAR)tolower(info.cFileName[i]);
info.cFileName[i] = (CHAR)tolower((unsigned char)info.cFileName[i]);
if (0 == memcmp(info.cFileName,szFile2, std::min(iSizeFound,iSize)))
{
@ -354,7 +354,7 @@ int CMaterialManager::FindValidPath(aiString* p_szString)
for (unsigned int i = 0;;++i)
{
if ('\0' == szTemp[i])break;
szTemp[i] = (char)tolower(szTemp[i]);
szTemp[i] = (char)tolower((unsigned char)szTemp[i]);
}
if(TryLongerPath(szTemp,p_szString))return 1;