From 3690eeb44cd86ac02eb21163d9a5e84784f6417d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 7 Jun 2006 02:59:51 -0700 Subject: [PATCH] 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. --- src/cairo-meta-surface.c | 4 ++-- src/cairo-pattern.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c index 02868e5cb..1ddeed05e 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 1ea6db008..496a8840c 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; }