OLEPictureImpl_Load: fix for headerless pictures
Kirill Smelkov
kirr at landau.phys.spbu.ru
Sun Feb 1 14:38:46 CST 2004
Hi,
In my case headerless bitmaps have
{ 0x42, 0x4d, 0x9c, 0xbd, 0x00, 0x00, 0x00, 0x00 } first 8 bytes.
So, when last four are equal to zero its 'no header' case.
ChangeLog:
OLEPictureImpl_Load: fix for headerless pictures
-------------- next part --------------
Index: dlls/oleaut32/olepicture.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/olepicture.c,v
retrieving revision 1.30
diff -u -r1.30 olepicture.c
--- dlls/oleaut32/olepicture.c 5 Sep 2003 23:08:33 -0000 1.30
+++ dlls/oleaut32/olepicture.c 1 Feb 2004 12:35:41 -0000
@@ -875,7 +875,7 @@
FIXME("Failure while reading picture header (hr is %lx, nread is %ld).\n",hr,xread);
return hr;
}
- if (header[1] > statstg.cbSize.QuadPart) {/* Incorrect header, assume none. */
+ if (header[1] > statstg.cbSize.QuadPart || (header[1]==0)) {/* Incorrect header, assume none. */
xread = 8;
xbuf = This->data = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,statstg.cbSize.QuadPart);
memcpy(xbuf,&header,8);
More information about the wine-patches
mailing list