[cairo] xlib re-re-re implementing the API

Carl Worth cworth at cworth.org
Tue May 17 03:03:35 PDT 2005


On Tue, 17 May 2005 00:00:47 -0700, Keith Packard wrote:
> +	masks.alpha_mask = (1 << surface->depth) - 1;
> +	if (!masks.alpha_mask)
> +	    masks.alpha_mask = 0xffffffff;

Uh-oh. Left shift by an amount greater than or equal to the width of
the left operand is undefined behavior. And, Owen, didn't you just
find a popular platform in which the result is 0xffffffff rather than
the "expected" 0x0 ?

-Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050517/e41b6ba3/attachment.pgp


More information about the cairo mailing list