summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-09-28 10:27:39 +0000
committerTor Lillqvist <tml@novell.com>2005-09-28 10:27:39 +0000
commit0cb8ee21b55cb2b935905c9bf05e076ff84b8522 (patch)
treea0f289412900e2b7f8fde27bb2017cd9b8408862
parentb8a08fbea6b287563653ba935fabdb5f8c1f329b (diff)
Bug #4612, reviewed by cworth.
Add cast so that sign conversion doesn't alter comparison.
-rw-r--r--ChangeLog7
-rw-r--r--src/cairo-win32-font.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 15c5b2c44..7b5dc26f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-28 T Rowley <tim.rowley@gmail.com>
+
+ Bug #4612, reviewed by cworth.
+
+ * src/cairo-win32-font.c (_cairo_win32_scaled_font_glyph_bbox):
+ Add cast so that sign conversion doesn't alter comparison.
+
2005-09-27 T Rowley <tim.rowley@gmail.com>
Bug #4602, reviewed by cworth.
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index ee24dbfba..c8dc61816 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -812,10 +812,10 @@ _cairo_win32_scaled_font_glyph_bbox (void *abstract_font,
x1 = x + metrics.gmptGlyphOrigin.x;
if (i == 0 || y1 > y - metrics.gmptGlyphOrigin.y)
y1 = y - metrics.gmptGlyphOrigin.y;
- if (i == 0 || x2 < x + metrics.gmptGlyphOrigin.x + metrics.gmBlackBoxX)
- x2 = x + metrics.gmptGlyphOrigin.x + metrics.gmBlackBoxX;
- if (i == 0 || y2 < y - metrics.gmptGlyphOrigin.y + metrics.gmBlackBoxY)
- y2 = y - metrics.gmptGlyphOrigin.y + metrics.gmBlackBoxY;
+ if (i == 0 || x2 < x + metrics.gmptGlyphOrigin.x + (int)metrics.gmBlackBoxX)
+ x2 = x + metrics.gmptGlyphOrigin.x + (int)metrics.gmBlackBoxX;
+ if (i == 0 || y2 < y - metrics.gmptGlyphOrigin.y + (int)metrics.gmBlackBoxY)
+ y2 = y - metrics.gmptGlyphOrigin.y + (int)metrics.gmBlackBoxY;
}
cairo_win32_scaled_font_done_font (&scaled_font->base);