We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1801

Summary: typo in the xcf decoder, condition is always false
Product: SDL_image Reporter: blaffablaffa
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: blaffablaffa
Version: unspecified   
Hardware: All   
OS: All   

Description blaffablaffa 2013-04-13 05:26:12 UTC
I'm compiling sdl_image with clang, and it gives this warning:

IMG_xcf.c:523:28: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
   l = (Uint8)(0.2990 * ((a && 0x00FF0000) >> 16)

This is of course always false, because (a && 0x00FF0000) is '1', so if shifted gives always 0. There are a couple of other similar issues in the same file.
Comment 1 Sam Lantinga 2013-04-17 04:46:19 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL_image/rev/ce8091caddf3