Wolfram Sang : user32: Ignore reserved bytes in BMP fileheader.
Alexandre Julliard
julliard at winehq.org
Mon Apr 26 13:59:31 CDT 2010
Module: wine
Branch: master
Commit: 94a3c0987e2765a4eed0a6dcba37dc45ca3d7dbf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=94a3c0987e2765a4eed0a6dcba37dc45ca3d7dbf
Author: Wolfram Sang <wolfram at the-dreams.de>
Date: Mon Apr 26 01:13:37 2010 +0200
user32: Ignore reserved bytes in BMP fileheader.
---
dlls/user32/cursoricon.c | 4 +---
dlls/user32/tests/cursoricon.c | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 7035c1b..0d74276 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -2486,9 +2486,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
if (!(ptr = map_fileW( name, NULL ))) return 0;
info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER));
bmfh = (BITMAPFILEHEADER *)ptr;
- if (!( bmfh->bfType == 0x4d42 /* 'BM' */ &&
- bmfh->bfReserved1 == 0 &&
- bmfh->bfReserved2 == 0))
+ if (bmfh->bfType != 0x4d42 /* 'BM' */)
{
WARN("Invalid/unsupported bitmap format!\n");
UnmapViewOfFile( ptr );
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index eb22ce4..c1da70d 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -700,7 +700,7 @@ static const unsigned char pngimage[285] = {
/* 1x1 pixel bmp */
static const unsigned char bmpimage[66] = {
-0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00,
+0x42,0x4d,0x42,0x00,0x00,0x00,0xDE,0xAD,0xBE,0xEF,0x3e,0x00,0x00,0x00,0x28,0x00,
0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,
0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00,
More information about the wine-cvs
mailing list