- when menu position cannot be found insert new item at the end

- reduces winetest failures from 1550 to 1250
- behaviour verified on Windows Vista

svn path=/trunk/; revision=33400
This commit is contained in:
Johannes Anderwald 2008-05-09 18:11:40 +00:00
parent 7a754a98d0
commit 9539538ba0

View file

@ -953,8 +953,9 @@ IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, BOOL fByPosition,
}
if (SubMenu == NULL)
{
SetLastWin32Error(ERROR_INVALID_PARAMETER);
return FALSE;
/* default to last position of menu */
SubMenu = MenuObject;
pos = MenuObject->MenuInfo.MenuItemCount;
}