[assimp_view] Make sure ctype calls use unsigned char.
Addresses https://github.com/assimp/assimp/issues/3867 and then some.pull/3880/head
parent
7dd7a053a9
commit
200086c4c5
|
@ -272,7 +272,7 @@ bool CMaterialManager::TryLongerPath(char* szTemp,aiString* p_szString)
|
||||||
szExtFound - 1 - info.cFileName);
|
szExtFound - 1 - info.cFileName);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < iSizeFound;++i)
|
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)))
|
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)
|
for (unsigned int i = 0;;++i)
|
||||||
{
|
{
|
||||||
if ('\0' == szTemp[i])break;
|
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;
|
if(TryLongerPath(szTemp,p_szString))return 1;
|
||||||
|
|
Loading…
Reference in New Issue