user32: Fix crash while dir-navigating in Win3.1-style file open dialog.
This commit is contained in:
parent
c6a20d7161
commit
4d99a8182d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue