user32: Also set cch member in GetMenuItemInfo when passing a null pointer.

This commit is contained in:
Michael Müller 2014-09-07 20:14:36 +02:00 committed by Alexandre Julliard
parent 4b1901d8c0
commit 997e197f23
1 changed files with 1 additions and 1 deletions

View File

@ -4583,12 +4583,12 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
if ((lpmii->fMask & (MIIM_TYPE|MIIM_STRING))) {
if( !menu->text ) {
if(lpmii->dwTypeData && lpmii->cch) {
lpmii->cch = 0;
if( unicode)
*((WCHAR *)lpmii->dwTypeData) = 0;
else
*((CHAR *)lpmii->dwTypeData) = 0;
}
lpmii->cch = 0;
} else {
int len;
if (unicode)