From 34329cf58e0709aeb187349db51e8a7c3c593749 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 10 Jul 2001 19:06:12 +0000 Subject: [PATCH] GetMenuItemID: return -1 for invalid menu items, not zero. --- controls/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls/menu.c b/controls/menu.c index cf7fd781a18..be26552407e 100644 --- a/controls/menu.c +++ b/controls/menu.c @@ -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;