Signed-off-by: Francois Gouget fgouget@codeweavers.com --- This fixes GetLastError() for EnumClipboardFormats(0xdead) for instance. --- dlls/user32/clipboard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index 2b5e3a85b5d..5176d707b8a 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -81,8 +81,11 @@ struct metafile_pict static const char *debugstr_format( UINT id ) { WCHAR buffer[256]; + DWORD le = GetLastError(); + BOOL r = GetClipboardFormatNameW( id, buffer, 256 ); + SetLastError(le);
- if (GetClipboardFormatNameW( id, buffer, 256 )) + if (r) return wine_dbg_sprintf( "%04x %s", id, debugstr_w(buffer) );
switch (id)