Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-05-29 15:45:29 +0300
committerOlivier Goffart <ogoffart@woboq.com>2018-05-29 15:51:28 +0300
commit7ba48849c659f21861a687131fdf8f9486f6c158 (patch)
treeaeb853e4db25389954439173ab2fb79389f5fe8a /shell_integration
parentce1aa6af5397994d84548cf66ffc78791d82cab7 (diff)
Windows Shell extention: Fix clicking on the menu entries
Issue #6553
Diffstat (limited to 'shell_integration')
-rw-r--r--shell_integration/windows/OCContextMenu/OCContextMenu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell_integration/windows/OCContextMenu/OCContextMenu.cpp b/shell_integration/windows/OCContextMenu/OCContextMenu.cpp
index bd305da65..9356187fe 100644
--- a/shell_integration/windows/OCContextMenu/OCContextMenu.cpp
+++ b/shell_integration/windows/OCContextMenu/OCContextMenu.cpp
@@ -162,7 +162,7 @@ IFACEMETHODIMP OCContextMenu::QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT
MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_STRING | MIIM_STATE;
- mii.wID = indexSubMenu;
+ mii.wID = idCmdFirst + indexSubMenu;
mii.fType = MFT_STRING;
mii.dwTypeData = &item.title[0];
mii.fState = disabled ? MFS_DISABLED : MFS_ENABLED;
@@ -192,7 +192,7 @@ IFACEMETHODIMP OCContextMenu::InvokeCommand(LPCMINVOKECOMMANDINFO pici)
// check the identifier offset.
auto offset = LOWORD(pici->lpVerb);
- if (offset < m_info.menuItems.size())
+ if (offset >= m_info.menuItems.size())
return E_FAIL;
command = m_info.menuItems[offset].command;