commit | 63ba55b00c769f0b64ec866ccf49a38277bca15b | [log] [tgz] |
---|---|---|
author | Guy Albertelli <guy@codeweavers.com> | Tue Jan 29 17:04:16 2002 +0000 |
committer | Alexandre Julliard <julliard@winehq.org> | Tue Jan 29 17:04:16 2002 +0000 |
tree | a8e20916dc2af0cacb297e7422a12a55e227c042 | |
parent | 2b74e91df576e192aaec46f87b0298c62c04f5a0 [diff] |
Don't fill colormap beyond end of screen depth.
diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 7a692d1..4b2c3e3 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c
@@ -137,6 +137,10 @@ if (coloruse == DIB_RGB_COLORS) { + int max = 1 << depth; + + if (end > max) end = max; + if (quads) { RGBQUAD * rgb = (RGBQUAD *)colorPtr;