Eric Pouech : ole32: Fixed some wrong conditions in OleFlushClipboard.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 24 04:55:27 CDT 2006


Module: wine
Branch: master
Commit: a79fa502806b5855d20ac73c823e012f0d77c8cd
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a79fa502806b5855d20ac73c823e012f0d77c8cd

Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date:   Sun Oct 22 21:48:49 2006 +0200

ole32: Fixed some wrong conditions in OleFlushClipboard.

---

 dlls/ole32/clipboard.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index 73627b3..89ecfd5 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -914,7 +914,8 @@ static HRESULT OLEClipbrd_RenderFormat(I
   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))




More information about the wine-cvs mailing list