From 15d84825d9bfeb9c8a8bac3c638c8a1ffbd77f60 Mon Sep 17 00:00:00 2001 From: Stepan Hrbek Date: Thu, 31 Dec 2015 03:18:11 +0100 Subject: [PATCH] Collada exporter: Fix isalnum(negative number) assert. isalnum(negative number) asserts in MSVC. It was first visible problem when exporting unicode filenames. --- code/ColladaExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ColladaExporter.cpp b/code/ColladaExporter.cpp index 6bd87e8f0..c0279e4c1 100644 --- a/code/ColladaExporter.cpp +++ b/code/ColladaExporter.cpp @@ -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;