Commit 34329cf5 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

GetMenuItemID: return -1 for invalid menu items, not zero.

parent 4be97b66
......@@ -3476,7 +3476,7 @@ UINT WINAPI GetMenuItemID( HMENU hMenu, INT nPos )
{
MENUITEM * lpmi;
if (!(lpmi = MENU_FindItem(&hMenu,&nPos,MF_BYPOSITION))) return 0;
if (!(lpmi = MENU_FindItem(&hMenu,&nPos,MF_BYPOSITION))) return -1;
if (lpmi->fType & MF_POPUP) return -1;
return lpmi->wID;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment