Bug in Color Context



Hi!

I just found a bug in gdkcc.c: gdk_color_context_query_color will return a
wrong value for the color red on 24/32-bit visuals on a 32-bit mashine due
to an overflow ((pixel & 0xff0000) * 65535 / 0xff0000).  Maybe something
like

((tc->pixel & cc->masks.red) >> cc->shifts.red) << (16 - cc->bits.red)

would do the job.

Eckehard Berns



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]