Paul Vriens : winecfg: Fix virtual desktop selection.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Aug 7 08:26:40 CDT 2007
Module: wine
Branch: master
Commit: a15b9fb860648f392c39f575d9b2efc314b3e705
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a15b9fb860648f392c39f575d9b2efc314b3e705
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Tue Aug 7 12:38:11 2007 +0200
winecfg: Fix virtual desktop selection.
---
programs/winecfg/winecfg.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c
index a3e5e07..4c86514 100644
--- a/programs/winecfg/winecfg.c
+++ b/programs/winecfg/winecfg.c
@@ -363,9 +363,12 @@ char *get_reg_key(HKEY root, const char *path, const char *name, const char *def
wRet = get_reg_keyW(root, wpath, wname, wdef);
- len = WideCharToMultiByte(CP_ACP, 0, wRet, -1, szRet, 0, NULL, NULL);
- szRet = HeapAlloc(GetProcessHeap(), 0, len);
- WideCharToMultiByte(CP_ACP, 0, wRet, -1, szRet, len, NULL, NULL);
+ len = WideCharToMultiByte(CP_ACP, 0, wRet, -1, NULL, 0, NULL, NULL);
+ if (len)
+ {
+ szRet = HeapAlloc(GetProcessHeap(), 0, len);
+ WideCharToMultiByte(CP_ACP, 0, wRet, -1, szRet, len, NULL, NULL);
+ }
HeapFree(GetProcessHeap(), 0, wpath);
HeapFree(GetProcessHeap(), 0, wname);
@@ -397,7 +400,7 @@ static void set_reg_key_ex(HKEY root, const WCHAR *path, const WCHAR *name, cons
assert( path != NULL );
- WINE_TRACE("path=%s, name=%s, value=%p\n", wine_dbgstr_w(path),
+ WINE_TRACE("path=%s, name=%s, value=%s\n", wine_dbgstr_w(path),
wine_dbgstr_w(name), wine_dbgstr_w(value));
/* firstly, see if we already set this setting */
More information about the wine-cvs
mailing list