From a79fa502806b5855d20ac73c823e012f0d77c8cd Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Sun, 22 Oct 2006 21:48:49 +0200 Subject: [PATCH] ole32: Fixed some wrong conditions in OleFlushClipboard. --- dlls/ole32/clipboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c index 73627b347c9..89ecfd58bc1 100644 --- a/dlls/ole32/clipboard.c +++ b/dlls/ole32/clipboard.c @@ -914,7 +914,8 @@ static HRESULT OLEClipbrd_RenderFormat(IDataObject *pIDataObject, LPFORMATETC pF ILockBytes *ptrILockBytes = 0; HGLOBAL hStorage = 0; - GetClipboardFormatNameA(pFormatetc->cfFormat, szFmtName, MAX_CLIPFORMAT_NAME); + if (!GetClipboardFormatNameA(pFormatetc->cfFormat, szFmtName, MAX_CLIPFORMAT_NAME)) + szFmtName[0] = '\0'; /* If embed source */ if (!strcmp(szFmtName, CF_EMBEDSOURCE))