user: Add missing sizeof(WCHAR) multiplier

James Hawkins truiken at gmail.com
Wed Oct 4 05:16:23 CDT 2006


Hi,

Changelog:
* Add missing sizeof(WCHAR) multiplier.

 dlls/user/dialog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/user/dialog.c b/dlls/user/dialog.c
index c2f6d95..8934a54 100644
--- a/dlls/user/dialog.c
+++ b/dlls/user/dialog.c
@@ -1651,7 +1651,7 @@ static BOOL DIALOG_DlgDirSelect( HWND hw
     size = SendMessageW(listbox, combo ? CB_GETLBTEXTLEN : LB_GETTEXTLEN, 0, 0 );
     if (size == LB_ERR) return FALSE;
 
-    if (!(buffer = HeapAlloc( GetProcessHeap(), 0, size+1 ))) return FALSE;
+    if (!(buffer = HeapAlloc( GetProcessHeap(), 0, (size+1) * sizeof(WCHAR) ))) return FALSE;
 
     SendMessageW( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT, item, (LPARAM)buffer );
 
-- 
1.3.0


More information about the wine-patches mailing list