diff options
author | David Turner <david@freetype.org> | 2001-04-27 09:49:27 +0000 |
---|---|---|
committer | David Turner <david@freetype.org> | 2001-04-27 09:49:27 +0000 |
commit | 07079d70c2507d4148d2308d52785b7bcd0465a9 (patch) | |
tree | 778e4564cac039f8cd7dbf1426ed6ce9ae9f7374 | |
parent | 4e8b2035567f46fd701a45b58f143d92c5f78de9 (diff) | |
download | freetype2-07079d70c2507d4148d2308d52785b7bcd0465a9.tar.gz |
* src/base/ftbbox.c (BBox_Cubic_Check): fixed the coefficient
normalization algorithm (invalid final bit position, and invalid
shift computation..)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/base/ftbbox.c | 10 |
2 files changed, 11 insertions, 5 deletions
@@ -1,3 +1,9 @@ +2001-04-27 David Turner <david@freetype.org> + + * src/base/ftbbox.c (BBox_Cubic_Check): fixed the coefficient + normalization algorithm (invalid final bit position, and invalid + shift computation..) + 2001-04-26 Werner Lemberg <wl@gnu.org> * builds/unix/config.guess, builds/unix/config.sub: Updated to diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c index 091a7bbfb..07700e500 100644 --- a/src/base/ftbbox.c +++ b/src/base/ftbbox.c @@ -382,25 +382,25 @@ if ( t1 == 0 ) /* all coefficients are 0! */ return; - if ( t1 > 0xFFFFFFL ) + if ( t1 > 0x7FFFFFL ) { do { - shift--; + shift++; t1 >>= 1; - } while ( t1 > 0xFFFFFFL ); + } while ( t1 > 0x7FFFFFL ); a >>= shift; b >>= shift; c >>= shift; } - else if ( t1 < 0x800000L ) + else if ( t1 < 0x400000L ) { do { shift++; t1 <<= 1; - } while ( t1 < 0x800000L ); + } while ( t1 < 0x400000L ); a <<= shift; b <<= shift; |