From de4c297cf79bbeaf39779788479cfeec08d4f034 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 1 Jun 2012 15:37:29 +0900 Subject: [PATCH] oleaut32: Always write header to stream when saving an icon. --- 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 d838920301..db3b852738 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -1768,15 +1768,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: