From 24cee3a8a3db419bc657860fc89cdfb1a0392f72 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 19 Oct 2015 23:00:28 +0200 Subject: [PATCH] [psaux] Fix tracing of negative numbers. Due to incorrect casting negative numbers were shown as very large (positive) integers on 64bit systems. * src/psaux/t1decode.c (t1_decoder_parse_charstrings) : Use division instead of shift. --- ChangeLog | 10 ++++++++++ src/psaux/t1decode.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0e1c86805..0073d6560 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2015-10-18 Werner Lemberg + + [psaux] Fix tracing of negative numbers. + + Due to incorrect casting negative numbers were shown as very large + (positive) integers on 64bit systems. + + * src/psaux/t1decode.c (t1_decoder_parse_charstrings) : + Use division instead of shift. + 2015-10-18 Werner Lemberg [truetype] Improve TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES (#46223). diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index c2d080e68..5811fcb49 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -669,7 +669,7 @@ if ( large_int ) FT_TRACE4(( " %ld", value )); else - FT_TRACE4(( " %ld", Fix2Int( value ) )); + FT_TRACE4(( " %ld", value / 65536 )); #endif *top++ = value;