[ftraster] Fix rendering. Problem reported by Tom Bishop <wenlin@wenlin.com>; see thread starting with http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv since the involved multiplication exceeds 32 bits.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/ChangeLog b/ChangeLog
index 8ce055f..5203265 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-28 Werner Lemberg <wl@gnu.org>
+
+ [ftraster] Fix rendering.
+
+ Problem reported by Tom Bishop <wenlin@wenlin.com>; see
+ thread starting with
+
+ http://lists.gnu.org/archive/html/freetype/2010-10/msg00049.html
+
+ * src/raster/ftraster.c (Line_Up): Replace FMulDiv with SMulDiv
+ since the involved multiplication exceeds 32 bits.
+
2010-10-25 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
Revert a change of `_idx' type in FTC_CACHE_LOOKUP_CMP().
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 4050cdc..aa51208 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1094,7 +1094,7 @@
return SUCCESS;
else
{
- x1 += FMulDiv( Dx, ras.precision - f1, Dy );
+ x1 += SMulDiv( Dx, ras.precision - f1, Dy );
e1 += 1;
}
}
@@ -1122,13 +1122,13 @@
if ( Dx > 0 )
{
- Ix = SMulDiv( ras.precision, Dx, Dy);
+ Ix = SMulDiv( ras.precision, Dx, Dy);
Rx = ( ras.precision * Dx ) % Dy;
Dx = 1;
}
else
{
- Ix = SMulDiv( ras.precision, -Dx, Dy) * -1;
+ Ix = SMulDiv( ras.precision, -Dx, Dy) * -1;
Rx = ( ras.precision * -Dx ) % Dy;
Dx = -1;
}