From a4124bf088fbce84bd594d7657ce7c685d1063dd Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 8 Jun 2010 09:21:39 +0200 Subject: [PATCH] Fix Savannah bug #30053. * src/cff/cffparse (cff_parse_real): Handle border case where `fraction_length' has value 10. --- ChangeLog | 7 +++++++ src/cff/cffparse.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index a7375f6fc..df72e09be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-08 Werner Lemberg + + Fix Savannah bug #30053. + + * src/cff/cffparse (cff_parse_real): Handle border case where + `fraction_length' has value 10. + 2010-06-07 Werner Lemberg Fix Savannah bug #30052. diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c index e57c75fe7..659b427ac 100644 --- a/src/cff/cffparse.c +++ b/src/cff/cffparse.c @@ -335,6 +335,13 @@ fraction_length += integer_length; } + /* this can only happen if exponent was non-zero */ + if ( fraction_length == 10 ) + { + number /= 10; + fraction_length -= 1; + } + /* Convert into 16.16 format. */ if ( fraction_length > 0 ) {