user32: Fix crash while dir-navigating in Win3.1-style file open dialog.

This commit is contained in:
Alex Villacís Lasso 2007-08-19 17:41:21 -05:00 committed by Alexandre Julliard
parent c6a20d7161
commit 4d99a8182d
1 changed files with 1 additions and 1 deletions

View File

@ -1677,7 +1677,7 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPWSTR str, INT len,
item = SendMessageW(listbox, combo ? CB_GETCURSEL : LB_GETCURSEL, 0, 0 );
if (item == LB_ERR) return FALSE;
size = SendMessageW(listbox, combo ? CB_GETLBTEXTLEN : LB_GETTEXTLEN, 0, 0 );
size = SendMessageW(listbox, combo ? CB_GETLBTEXTLEN : LB_GETTEXTLEN, item, 0 );
if (size == LB_ERR) return FALSE;
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, (size+1) * sizeof(WCHAR) ))) return FALSE;