user32: Ignore reserved bytes in BMP fileheader.
This commit is contained in:
parent
b25cd21df2
commit
94a3c0987e
|
@ -2486,9 +2486,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
|
||||||
if (!(ptr = map_fileW( name, NULL ))) return 0;
|
if (!(ptr = map_fileW( name, NULL ))) return 0;
|
||||||
info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER));
|
info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER));
|
||||||
bmfh = (BITMAPFILEHEADER *)ptr;
|
bmfh = (BITMAPFILEHEADER *)ptr;
|
||||||
if (!( bmfh->bfType == 0x4d42 /* 'BM' */ &&
|
if (bmfh->bfType != 0x4d42 /* 'BM' */)
|
||||||
bmfh->bfReserved1 == 0 &&
|
|
||||||
bmfh->bfReserved2 == 0))
|
|
||||||
{
|
{
|
||||||
WARN("Invalid/unsupported bitmap format!\n");
|
WARN("Invalid/unsupported bitmap format!\n");
|
||||||
UnmapViewOfFile( ptr );
|
UnmapViewOfFile( ptr );
|
||||||
|
|
|
@ -700,7 +700,7 @@ static const unsigned char pngimage[285] = {
|
||||||
|
|
||||||
/* 1x1 pixel bmp */
|
/* 1x1 pixel bmp */
|
||||||
static const unsigned char bmpimage[66] = {
|
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,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,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,
|
0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00,
|
||||||
|
|
Loading…
Reference in New Issue