Alexandre Julliard : ole32: Don't set zero-size clipboard data, this no longer works.
Alexandre Julliard
julliard at winehq.org
Thu Feb 2 15:49:27 CST 2017
Module: wine
Branch: master
Commit: 77e566a3cbd0341ffeff7e8b7f42369622ac240a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=77e566a3cbd0341ffeff7e8b7f42369622ac240a
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Feb 2 18:51:10 2017 +0100
ole32: Don't set zero-size clipboard data, this no longer works.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole32/clipboard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/clipboard.c b/dlls/ole32/clipboard.c
index e3c93c9..b547cdf 100644
--- a/dlls/ole32/clipboard.c
+++ b/dlls/ole32/clipboard.c
@@ -1110,7 +1110,7 @@ static HRESULT get_current_dataobject(IDataObject **data)
h = GetClipboardData(wine_marshal_clipboard_format);
if(!h) return S_FALSE;
- if(GlobalSize(h) == 0) return S_FALSE;
+ if(GlobalSize(h) <= 1) return S_FALSE;
ptr = GlobalLock(h);
if(!ptr) return S_FALSE;
@@ -1957,7 +1957,7 @@ static HRESULT expose_marshalled_dataobject(ole_clipbrd *clipbrd, IDataObject *d
dup_global_mem(h_stm, GMEM_DDESHARE|GMEM_MOVEABLE, &h);
}
else /* flushed */
- h = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 0);
+ h = GlobalAlloc(GMEM_DDESHARE|GMEM_MOVEABLE, 1);
if(!h) return E_OUTOFMEMORY;
More information about the wine-cvs
mailing list