diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index ee300d548c..3ce1704aa8 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -385,8 +385,9 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) LPCTSTR pData = NULL; if ( pos == (size_t)-1 ) { - // append at the end - pos = GetMenuItemCount(); + // append at the end (note that the item is already appended to + // internal data structures) + pos = GetMenuItemCount() - 1; } BOOL ok = false;