diff options
author | Werner Lemberg <wl@gnu.org> | 2015-02-18 11:45:22 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2015-02-18 11:45:22 +0100 |
commit | 3b5f332c5b08e252551c594e9ac3ed69ec8b3360 (patch) | |
tree | ac647ce365a496ade39b38d6b474d6a8b66e87c0 /src/type1/t1parse.c | |
parent | 272e3cd077c561ca8fa452be4b3fed41818d2d8d (diff) | |
download | freetype2-3b5f332c5b08e252551c594e9ac3ed69ec8b3360.tar.gz |
[type1] Fix signedness issues.
* include/internal/psaux.h, include/internal/t1types.h,
src/psaux/psobjs.c, src/psaux/psobjs.h, src/psaux/t1decode.c,
src/type1/t1gload.c, src/type1/t1load.c, src/type1/t1parse.c: Apply.
Diffstat (limited to 'src/type1/t1parse.c')
-rw-r--r-- | src/type1/t1parse.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c index 40ffd07c1..feea224f6 100644 --- a/src/type1/t1parse.c +++ b/src/type1/t1parse.c @@ -273,7 +273,7 @@ /* made of several segments. We thus first read the number of */ /* segments to compute the total size of the private dictionary */ /* then re-read them into memory. */ - FT_Long start_pos = FT_STREAM_POS(); + FT_ULong start_pos = FT_STREAM_POS(); FT_UShort tag; @@ -411,9 +411,11 @@ /* fine that are violating this limitation, so we add a heuristic */ /* test to stop at \r only if it is not used for EOL. */ - pos_lf = ft_memchr( cur, '\n', limit - cur ); - test_cr = FT_BOOL( !pos_lf || - pos_lf > ft_memchr( cur, '\r', limit - cur ) ); + pos_lf = ft_memchr( cur, '\n', (size_t)( limit - cur ) ); + test_cr = FT_BOOL( !pos_lf || + pos_lf > ft_memchr( cur, + '\r', + (size_t)( limit - cur ) ) ); while ( cur < limit && ( *cur == ' ' || @@ -429,7 +431,7 @@ goto Exit; } - size = (FT_ULong)( parser->base_len - ( cur - parser->base_dict ) ); + size = parser->base_len - (FT_ULong)( cur - parser->base_dict ); if ( parser->in_memory ) { @@ -459,7 +461,7 @@ ft_isxdigit( cur[2] ) && ft_isxdigit( cur[3] ) ) { /* ASCII hexadecimal encoding */ - FT_Long len; + FT_ULong len; parser->root.cursor = cur; |