Просмотр исходного кода

text-freetype2: Fix wrong parameter type

These functions expect char*, where as the string is stored as a
unsigned char* (FT_Byte*).
jp9000 10 лет назад
Родитель
Сommit
4ba293a6d9
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      plugins/text-freetype2/find-font-windows.c

+ 3 - 2
plugins/text-freetype2/find-font-windows.c

@@ -172,11 +172,12 @@ char *sfnt_name_to_utf8(FT_SfntName *sfnt_name)
 		return NULL;
 		return NULL;
 
 
 	utf16_len = MultiByteToWideChar(code_page, 0,
 	utf16_len = MultiByteToWideChar(code_page, 0,
-			sfnt_name->string, sfnt_name->string_len, NULL, 0);
+			(char*)sfnt_name->string, sfnt_name->string_len,
+			NULL, 0);
 	if (utf16_len) {
 	if (utf16_len) {
 		utf16_str = malloc((utf16_len + 1) * sizeof(wchar_t));
 		utf16_str = malloc((utf16_len + 1) * sizeof(wchar_t));
 		utf16_len = MultiByteToWideChar(code_page, 0,
 		utf16_len = MultiByteToWideChar(code_page, 0,
-				sfnt_name->string, sfnt_name->string_len,
+				(char*)sfnt_name->string, sfnt_name->string_len,
 				utf16_str, (int)utf16_len);
 				utf16_str, (int)utf16_len);
 
 
 		if (utf16_len) {
 		if (utf16_len) {