diff --git "a/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c" "b/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c" index 8d9737310c7..2d5d0dbb81b 100644 --- "a/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c" +++ "b/sdk/lib/3rdparty/freetype/src/sfnt/ttcmap.c" @@ -1242,6 +1242,16 @@ num_segs = num_segs2 >> 1; + if (charcode == 0xa6a0) + { + FT_ERROR(( "Debug1:" + "charcode is 0x%x\n", charcode )); + FT_ERROR(( "Debug2:" + "num_segs is %d\n", num_segs )); + FT_ERROR(( "Debug3:" + "Font is %s\n", face->name_table.names[1].string )); + } + /* make compiler happy */ mid = num_segs; end = 0xFFFFU; @@ -1267,6 +1277,15 @@ min = mid + 1; else { + + if (!(min == 0 && max == 1)) + { + FT_ERROR(( "Debug4:" + "min/max is %d/%d\n", min, max )); + FT_ERROR(( "Debug5:" + "charcode is 0x%x\n", charcode )); + } + p += num_segs2; delta = TT_PEEK_SHORT( p ); p += num_segs2; @@ -1404,7 +1423,12 @@ if ( next && p > limit ) break; - gindex = TT_PEEK_USHORT( p ); + FT_ERROR(( "Debug6:" + "charcode is 0x%x\n", charcode )); + FT_ERROR(( "Debug7:" + "Font is %s\n", face->name_table.names[1].string )); + + gindex = TT_PEEK_USHORT( p ); // CORE-12549 if ( gindex ) { gindex = (FT_UInt)( (FT_Int)gindex + delta ) & 0xFFFFU;