user32: Also set cch member in GetMenuItemInfo when passing a null pointer.
This commit is contained in:
parent
4b1901d8c0
commit
997e197f23
|
@ -4583,12 +4583,12 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
|
||||||
if ((lpmii->fMask & (MIIM_TYPE|MIIM_STRING))) {
|
if ((lpmii->fMask & (MIIM_TYPE|MIIM_STRING))) {
|
||||||
if( !menu->text ) {
|
if( !menu->text ) {
|
||||||
if(lpmii->dwTypeData && lpmii->cch) {
|
if(lpmii->dwTypeData && lpmii->cch) {
|
||||||
lpmii->cch = 0;
|
|
||||||
if( unicode)
|
if( unicode)
|
||||||
*((WCHAR *)lpmii->dwTypeData) = 0;
|
*((WCHAR *)lpmii->dwTypeData) = 0;
|
||||||
else
|
else
|
||||||
*((CHAR *)lpmii->dwTypeData) = 0;
|
*((CHAR *)lpmii->dwTypeData) = 0;
|
||||||
}
|
}
|
||||||
|
lpmii->cch = 0;
|
||||||
} else {
|
} else {
|
||||||
int len;
|
int len;
|
||||||
if (unicode)
|
if (unicode)
|
||||||
|
|
Loading…
Reference in New Issue