[Wine-patches] [eter-2.0.0 4/4] oleaut32: Always write header to stream when saving an icon. (eterbug #8330)

Dmitry Timoshkov dtimoshkov на etersoft.ru
Пн Июн 4 07:40:26 MSK 2012


---
 dlls/oleaut32/olepicture.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 4cfe9f8..8e23d0e 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -1731,15 +1731,11 @@ static HRESULT WINAPI OLEPictureImpl_Save(
             This->data = pIconData;
             This->datalen = iDataSize;
         }
-        if (This->loadtime_magic != 0xdeadbeef) {
-            DWORD header[2];
 
-            header[0] = This->loadtime_magic;
-            header[1] = This->datalen;
-            IStream_Write(pStm, header, 2 * sizeof(DWORD), &dummy);
-        }
+        header[0] = (This->loadtime_magic != 0xdeadbeef) ? This->loadtime_magic : 0x0000746c;
+        header[1] = This->datalen;
+        IStream_Write(pStm, header, 2 * sizeof(DWORD), &dummy);
         IStream_Write(pStm, This->data, This->datalen, &dummy);
-
         hResult = S_OK;
         break;
     case PICTYPE_BITMAP:
-- 
1.7.10.1



Подробная информация о списке рассылки Wine-patches