Commit f83d24d4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ole32: Don't write empty CLIPFORMAT in WriteFmtUserTypeStg.

parent 306e9842
......@@ -8769,8 +8769,12 @@ HRESULT WINAPI WriteFmtUserTypeStg(
TRACE("(%p,%x,%s)\n",pstg,cf,debugstr_w(lpszUserType));
/* get the clipboard format name */
n = GetClipboardFormatNameW( cf, szwClipName, sizeof(szwClipName)/sizeof(szwClipName[0]) );
szwClipName[n]=0;
if( cf )
{
n = GetClipboardFormatNameW( cf, szwClipName,
sizeof(szwClipName)/sizeof(szwClipName[0]) );
szwClipName[n]=0;
}
TRACE("Clipboard name is %s\n", debugstr_w(szwClipName));
......@@ -8784,8 +8788,8 @@ HRESULT WINAPI WriteFmtUserTypeStg(
TRACE("progid is %s\n",debugstr_w(wstrProgID));
r = STORAGE_WriteCompObj( pstg, &clsid,
lpszUserType, szwClipName, wstrProgID );
r = STORAGE_WriteCompObj( pstg, &clsid, lpszUserType,
cf ? szwClipName : NULL, wstrProgID );
CoTaskMemFree(wstrProgID);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment