summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-06-07 02:59:51 -0700
committerCarl Worth <cworth@cworth.org>2006-06-07 02:59:51 -0700
commit3690eeb44cd86ac02eb21163d9a5e84784f6417d (patch)
treec114133163e1824850843a115fc7849d67687cd8
parent7f2cf378d595fa559401c76f051ca9b5e6809763 (diff)
Change all instances of UINT16_MAX to INT16_MAX to avoid new bug.
A recent renaming from CAIRO_MAXSHORT also changed the range of some values from INT16_MAX to UINT16_MAX. The test suite shows one case where this introduces a bug, (push/pop_group with SVG and RGB24 surfaces). I haven't tracked the bug down, (presumably there's overflow of the unsigned value at some point), but I'm now reverting this to avoid triggering the bug.
-rw-r--r--src/cairo-meta-surface.c4
-rw-r--r--src/cairo-pattern.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 02868e5c..1ddeed05 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -551,8 +551,8 @@ _cairo_meta_surface_get_extents (void *abstract_surface,
{
rectangle->x = 0;
rectangle->y = 0;
- rectangle->width = UINT16_MAX;
- rectangle->height = UINT16_MAX;
+ rectangle->width = INT16_MAX;
+ rectangle->height = INT16_MAX;
return CAIRO_STATUS_SUCCESS;
}
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 1ea6db00..496a8840 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -1457,8 +1457,8 @@ _cairo_pattern_get_extents (cairo_pattern_t *pattern,
extents->x = 0;
extents->y = 0;
- extents->width = UINT16_MAX;
- extents->height = UINT16_MAX;
+ extents->width = INT16_MAX;
+ extents->height = INT16_MAX;
return CAIRO_STATUS_SUCCESS;
}