diff --git a/dlls/user/menu.c b/dlls/user/menu.c index 26274036887..e470c19ba8f 100644 --- a/dlls/user/menu.c +++ b/dlls/user/menu.c @@ -4230,10 +4230,10 @@ static BOOL SetMenuItemInfo_common(MENUITEM * menu, menu->fType &= ~MENU_ITEM_TYPE(menu->fType); menu->fType |= MENU_ITEM_TYPE(lpmii->fType); - menu->text = lpmii->dwTypeData; - - if (IS_STRING_ITEM(menu->fType)) - set_menu_item_text( menu, lpmii->dwTypeData, unicode ); + if (IS_STRING_ITEM(menu->fType)) + set_menu_item_text( menu, lpmii->dwTypeData, unicode ); + else + menu->text = lpmii->dwTypeData; } if (lpmii->fMask & MIIM_FTYPE ) { @@ -4244,8 +4244,11 @@ static BOOL SetMenuItemInfo_common(MENUITEM * menu, } menu->fType &= ~MENU_ITEM_TYPE(menu->fType); menu->fType |= MENU_ITEM_TYPE(lpmii->fType); - if ( IS_STRING_ITEM(menu->fType) && !menu->text ) - menu->fType |= MF_SEPARATOR; + + if (IS_STRING_ITEM(menu->fType)) + set_menu_item_text( menu, lpmii->dwTypeData, unicode ); + else + menu->text = lpmii->dwTypeData; } if (lpmii->fMask & MIIM_STRING ) { diff --git a/dlls/user/tests/menu.c b/dlls/user/tests/menu.c index 5b209ab0064..9c6b17c538f 100644 --- a/dlls/user/tests/menu.c +++ b/dlls/user/tests/menu.c @@ -277,9 +277,7 @@ static void test_menu_add_string( void ) string[0] = 0; GetMenuItemInfo( hmenu, 0, TRUE, &info ); - todo_wine { ok( !strcmp( string, "blah" ), "menu item name differed\n"); - } DestroyMenu( hmenu ); }