diff options
author | Benjamin Herrenschmidt benh@kernel.crashing.org <benh@tika.localdomain> | 2006-11-28 22:47:49 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@tika.localdomain> | 2006-11-28 22:47:49 +1100 |
commit | ce360a000076a8cd38f88ee4c4806fcae4fe02dd (patch) | |
tree | 572338929073dc0936cdc08bcdc03b816071420f | |
parent | a9ae3dc5ea52621f7092a60168c5da794891847b (diff) |
Fix copy/paste bogon on 16 bits tranform
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | twin_draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/twin_draw.c b/twin_draw.c index f8e88dd..7c2b699 100644 --- a/twin_draw.c +++ b/twin_draw.c @@ -399,14 +399,14 @@ static void twin_pixmap_free_xform (twin_xform_t *xform) #define _get_pix_16(d, pix, x, y) \ do { \ twin_rgb16_t p = _pix_clipped(pix, x, y) ? 0 : \ - *((pix)->p.argb32 + XF(y) * ((pix)->stride / 4) + XF(x)); \ + *((pix)->p.argb32 + XF(y) * ((pix)->stride >> 1) + XF(x)); \ *((twin_argb32_t *)(char *)(d)) = twin_rgb16_to_argb32(p); \ } while(0) #define _get_pix_32(d, pix, x, y) \ do { \ twin_argb32_t p = _pix_clipped(pix, x, y) ? 0 : \ - *((pix)->p.argb32 + XF(y) * ((pix)->stride / 4) + XF(x)); \ + *((pix)->p.argb32 + XF(y) * ((pix)->stride >> 2) + XF(x)); \ *((twin_argb32_t *)(char *)(d)) = p; \ } while(0) |