소스 검색

Fix a bug caused a crash on VS2013 or later when in Debug mode if there is any Unicode chars such as Chinese in Atlas file. (#788)

taigacon 8 년 전
부모
커밋
9fedf6877a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      spine-c/spine-c/src/spine/Atlas.c

+ 2 - 2
spine-c/spine-c/src/spine/Atlas.c

@@ -66,11 +66,11 @@ typedef struct {
 } Str;
 
 static void trim (Str* str) {
-	while (isspace(*str->begin) && str->begin < str->end)
+	while (isspace((unsigned char)*str->begin) && str->begin < str->end)
 		(str->begin)++;
 	if (str->begin == str->end) return;
 	str->end--;
-	while (isspace(*str->end) && str->end >= str->begin)
+	while (isspace((unsigned char)*str->end) && str->end >= str->begin)
 		str->end--;
 	str->end++;
 }