[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] int-not32-changes-2017 4e41249 22/25: cpp-conditionalize too
From: |
suzuki toshiya |
Subject: |
[freetype2] int-not32-changes-2017 4e41249 22/25: cpp-conditionalize too large property value check for LP64 systems, |
Date: |
Wed, 13 Sep 2017 04:15:07 -0400 (EDT) |
branch: int-not32-changes-2017
commit 4e41249fada36591bd9b6bfe046c5a85db3e1509
Author: suzuki toshiya <address@hidden>
Commit: suzuki toshiya <address@hidden>
cpp-conditionalize too large property value check for LP64 systems,
because it is always false on 16bit & 32bit systems.
---
src/base/ftobjs.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 9b23045..23bbdf6 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3543,11 +3543,14 @@
FT_CMap cmap = FT_CMAP( face->charmap );
+/* care for 64bit platforms */
+#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
+#endif
result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );
if ( result >= (FT_UInt)face->num_glyphs )
@@ -3723,6 +3726,8 @@
FT_CMap vcmap = FT_CMAP( charmap );
+/* care for 64bit platforms */
+#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
@@ -3735,6 +3740,7 @@
" too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
+#endif
result = vcmap->clazz->char_var_index( vcmap, ucmap,
(FT_UInt32)charcode,
@@ -3766,6 +3772,8 @@
FT_CMap vcmap = FT_CMAP( charmap );
+/* care for 64bit platforms */
+#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
@@ -3778,6 +3786,7 @@
" too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
+#endif
result = vcmap->clazz->char_var_default( vcmap,
(FT_UInt32)charcode,
@@ -3836,11 +3845,14 @@
FT_Memory memory = FT_FACE_MEMORY( face );
+/* care for 64bit platforms */
+#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
+#endif
result = vcmap->clazz->charvariant_list( vcmap, memory,
(FT_UInt32)charcode );
@@ -3870,11 +3882,14 @@
FT_Memory memory = FT_FACE_MEMORY( face );
+/* care for 64bit platforms */
+#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( variantSelector > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
+#endif
result = vcmap->clazz->variantchar_list( vcmap, memory,
(FT_UInt32)variantSelector );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] int-not32-changes-2017 4e41249 22/25: cpp-conditionalize too large property value check for LP64 systems,,
suzuki toshiya <=