leslie.polzer@gmx.net wrote:
if (colors > 256)
- {
ERR("called with >256 colors!\n");
return NULL;
- }
WARN("called with >256 (%d) colors!\n", colors);
We appear to only get down this codepath if bmBitsPixel <= 8, so there should be no more than 2^8 colours.
Maybe you can investigate how we can get a DIB with bmBitsPixel <= 8 and (biClrUsed > 256 or bcBitCount>8) ?
Mike
On Thu, May 04, 2006 at 12:16:10PM +0900, Mike McCormack wrote:
Maybe you can investigate how we can get a DIB with bmBitsPixel <= 8 and (biClrUsed > 256 or bcBitCount>8) ?
I'm not an expert on this, but I supposed the application called it with an off-by-one value of 257? Do you think the problem could be with Wine?
Leslie
leslie.polzer@gmx.net wrote:
On Thu, May 04, 2006 at 12:16:10PM +0900, Mike McCormack wrote:
Maybe you can investigate how we can get a DIB with bmBitsPixel <= 8 and (biClrUsed > 256 or bcBitCount>8) ?
I'm not an expert on this, but I supposed the application called it with an off-by-one value of 257? Do you think the problem could be with Wine?
Most likely the 'color' should be silently truncated to 256, we had same kind of the problem with X11DRV_[Set|Get]DIBColorTable.
On Thu, 4 May 2006, leslie.polzer@gmx.net wrote:
On Thu, May 04, 2006 at 12:16:10PM +0900, Mike McCormack wrote:
Maybe you can investigate how we can get a DIB with bmBitsPixel <= 8 and (biClrUsed > 256 or bcBitCount>8) ?
I'm not an expert on this, but I supposed the application called it with an off-by-one value of 257? Do you think the problem could be with Wine?
I think Mike's idea is to check whether it could be a Wine bug that causes the application to pass us an invalid value (e.g. some API returning 256 instead of 255 or some such). This happens sometimes and then we would want to fix the original bug.
However, as Dmitry said, this might also be a simple application bug. If you can add a conformance test to check how Windows behaves in this situation it could also help clarify things (apologies if your patch already contained such a test).