oleaut32: Always write header to stream when saving an icon.

This commit is contained in:
Dmitry Timoshkov 2012-06-01 15:37:29 +09:00 committed by Alexandre Julliard
parent 7493fdcc4d
commit de4c297cf7
1 changed files with 3 additions and 7 deletions

View File

@ -1768,15 +1768,11 @@ static HRESULT WINAPI OLEPictureImpl_Save(
This->data = pIconData; This->data = pIconData;
This->datalen = iDataSize; This->datalen = iDataSize;
} }
if (This->loadtime_magic != 0xdeadbeef) {
DWORD header[2];
header[0] = This->loadtime_magic; header[0] = (This->loadtime_magic != 0xdeadbeef) ? This->loadtime_magic : 0x0000746c;
header[1] = This->datalen; header[1] = This->datalen;
IStream_Write(pStm, header, 2 * sizeof(DWORD), &dummy); IStream_Write(pStm, header, 2 * sizeof(DWORD), &dummy);
}
IStream_Write(pStm, This->data, This->datalen, &dummy); IStream_Write(pStm, This->data, This->datalen, &dummy);
hResult = S_OK; hResult = S_OK;
break; break;
case PICTYPE_BITMAP: case PICTYPE_BITMAP: