summaryrefslogtreecommitdiff
path: root/src/modules/clist/genmenu.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-15 10:58:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-15 10:58:04 +0000
commit5e8e561a80d1ac9ca1c2f1c3d388105733ed4e4e (patch)
treee37b84152d26ec5bbc11914ed4acb4666b4916fc /src/modules/clist/genmenu.cpp
parent894b8229000f1271c4cad9d6d9f516a91f2249f0 (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/clist/genmenu.cpp')
-rw-r--r--src/modules/clist/genmenu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp
index d38f0fbfc4..9395bb1588 100644
--- a/src/modules/clist/genmenu.cpp
+++ b/src/modules/clist/genmenu.cpp
@@ -789,9 +789,10 @@ static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *l
int needSeparator = (p->mi.position / SEPARATORPOSITIONINTERVAL) != (pimi->mi.position / SEPARATORPOSITIONINTERVAL);
if ( needSeparator) {
//but might be supposed to be after the next one instead
- mii.fType = 0;
+ memset(&mii, 0, sizeof(mii));
+ mii.cbSize = MENUITEMINFO_V4_SIZE;
if ( uItem < GetMenuItemCount( hMenu )) {
- mii.fMask = MIIM_SUBMENU | MIIM_DATA | MIIM_TYPE;
+ mii.fMask = MIIM_TYPE;
GetMenuItemInfo( hMenu, uItem, TRUE, &mii );
}
if ( mii.fType != MFT_SEPARATOR) {
@@ -804,8 +805,7 @@ static void InsertMenuItemWithSeparators(HMENU hMenu, int uItem, MENUITEMINFO *l
//check for separator after
if ( uItem < GetMenuItemCount( hMenu )) {
- mii.fMask = MIIM_SUBMENU | MIIM_DATA | MIIM_TYPE;
- mii.cch = 0;
+ mii.fMask = MIIM_TYPE;
GetMenuItemInfo( hMenu, uItem, TRUE, &mii );
PMO_IntMenuItem p = MO_GetIntMenuItem(( HGENMENU )mii.dwItemData );
if ( p != NULL && mii.fType == MFT_SEPARATOR ) {