Module: wine Branch: refs/heads/master Commit: c50fbab47f99a5787e29892fce6686c5eb92939c URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=c50fbab47f99a5787e29892f...
Author: Aric Stewart aric@codeweavers.com Date: Wed Dec 14 10:49:54 2005 +0100
user: GetClipboardFormatNameA fix. In the W->A translation make sure we have characters to translate before doing the WideCharToMultiByte with -1.
---
dlls/user/clipboard.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/user/clipboard.c b/dlls/user/clipboard.c index 5a51f01..2e54f76 100644 --- a/dlls/user/clipboard.c +++ b/dlls/user/clipboard.c @@ -271,7 +271,7 @@ INT WINAPI GetClipboardFormatNameA(UINT
ret = GetClipboardFormatNameW( wFormat, p, maxlen );
- if (maxlen > 0 && !WideCharToMultiByte( CP_ACP, 0, p, -1, retStr, maxlen, 0, 0)) + if (ret && maxlen > 0 && !WideCharToMultiByte( CP_ACP, 0, p, -1, retStr, maxlen, 0, 0)) retStr[maxlen-1] = 0; HeapFree( GetProcessHeap(), 0, p ); return ret;