Author: tfaber
Date: Mon Mar 28 14:58:20 2016
New Revision: 71063
URL:
http://svn.reactos.org/svn/reactos?rev=71063&view=rev
Log:
[USER32]
- Fix is_dib_monochrome for bitmaps using BITMAPCOREINFO. Patch by Mark Jansen.
CORE-10889
Modified:
trunk/reactos/win32ss/user/user32/windows/cursoricon.c
Modified: trunk/reactos/win32ss/user/user32/windows/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/cursoricon.c [iso-8859-1] Mon Mar 28
14:58:20 2016
@@ -117,11 +117,11 @@
static BOOL is_dib_monochrome( const BITMAPINFO* info )
{
- if (info->bmiHeader.biBitCount != 1) return FALSE;
-
if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
{
const RGBTRIPLE *rgb = ((const BITMAPCOREINFO*)info)->bmciColors;
+
+ if (((const BITMAPCOREINFO*)info)->bmciHeader.bcBitCount != 1) return FALSE;
/* Check if the first color is black */
if ((rgb->rgbtRed == 0) && (rgb->rgbtGreen == 0) &&
(rgb->rgbtBlue == 0))
@@ -137,6 +137,8 @@
else /* assume BITMAPINFOHEADER */
{
const RGBQUAD *rgb = info->bmiColors;
+
+ if (info->bmiHeader.biBitCount != 1) return FALSE;
/* Check if the first color is black */
if ((rgb->rgbRed == 0) && (rgb->rgbGreen == 0) &&