Collada exporter: Fix isalnum(negative number) assert.

isalnum(negative number) asserts in MSVC.
It was first visible problem when exporting unicode filenames.
pull/736/head
Stepan Hrbek 2015-12-31 03:18:11 +01:00
parent e02a7cdb3c
commit 15d84825d9
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ void ColladaExporter::WriteImageEntry( const Surface& pSurface, const std::strin
std::stringstream imageUrlEncoded;
for( std::string::const_iterator it = pSurface.texture.begin(); it != pSurface.texture.end(); ++it )
{
if( isalnum( *it) || *it == '_' || *it == '.' || *it == '/' || *it == '\\' )
if( isalnum( (unsigned char) *it) || *it == '_' || *it == '.' || *it == '/' || *it == '\\' )
imageUrlEncoded << *it;
else
imageUrlEncoded << '%' << std::hex << size_t( (unsigned char) *it) << std::dec;