summaryrefslogtreecommitdiff
path: root/uxa
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-09 09:59:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-06-09 09:59:36 +0100
commit994aa1ef571ac2ab05f6588f9068d33b536c7a37 (patch)
tree80c254e85e2580c23cc90d118e49f8aece9d4826 /uxa
parentf429fb9d872950705e11171d0e7407fb7673c786 (diff)
uxa: Handle all-clipped out case with destination glyphs.
Fixes the crash reported in: Bug 28446 - Garbled Font with Mathematica 7 https://bugs.freedesktop.org/show_bug.cgi?id=28446 pDst=0x3d663c0, src_x=0, src_y=0, xDst=142, yDst=112, nlist=0, list=0x7fffea026580, glyphs=0x7fffea025d88, extents=0x0) at uxa-glyphs.c:809 dx = 0 y1 = 101 x2 = 150 x1 = 142 dy = 0 y2 = 112 rects = 0x5491000 this_atlas = 0x2456d00 mask_y = 128 glyph = 0x35933a0 mask_x = 736 priv = 0x39309e0 screen = 0x8d2cc0 uxa_screen = 0x2443eb0 src_pixmap = 0x37c29e0 dst_pixmap = 0x45ddbf0 localSrc = 0x361a450 glyph_atlas = 0x2456d00 x = 142 y = 112 n = 18 nrect = -9975128 box = {x1 = 23152, y1 = -5630, x2 = 32767, y2 = 0} __PRETTY_FUNCTION__ = "uxa_glyphs_to_dst" Though the meat of that bug regarding the incorrect remains unsolved. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa')
-rw-r--r--uxa/uxa-glyphs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
index e679b4e3..31bf9158 100644
--- a/uxa/uxa-glyphs.c
+++ b/uxa/uxa-glyphs.c
@@ -800,7 +800,7 @@ uxa_glyphs_to_dst(CARD8 op,
glyph->info.height);
} else {
BoxPtr rects = REGION_RECTS(pDst->pCompositeClip);
- do {
+ while (nrect--) {
int x1 = x - glyph->info.x, dx = 0;
int y1 = y - glyph->info.y, dy = 0;
int x2 = x1 + glyph->info.width;
@@ -823,7 +823,7 @@ uxa_glyphs_to_dst(CARD8 op,
x2 - x1, y2 - y1);
}
rects++;
- } while (--nrect);
+ }
}
next_glyph: