summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/chat
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/chat')
-rw-r--r--plugins/Scriver/src/chat/tools.cpp12
-rw-r--r--plugins/Scriver/src/chat/window.cpp3
2 files changed, 8 insertions, 7 deletions
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 280700fbcb..43aa5c669f 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -108,13 +108,13 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s
void DestroyGCMenu(HMENU *hMenu, int iIndex)
{
- MENUITEMINFO mi;
- mi.cbSize = sizeof(mi);
- mi.fMask = MIIM_SUBMENU;
- while(GetMenuItemInfo(*hMenu, iIndex, TRUE, &mi))
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
+ mii.fMask = MIIM_SUBMENU;
+ while(GetMenuItemInfo(*hMenu, iIndex, TRUE, &mii))
{
- if (mi.hSubMenu != NULL)
- DestroyMenu(mi.hSubMenu);
+ if (mii.hSubMenu != NULL)
+ DestroyMenu(mii.hSubMenu);
RemoveMenu(*hMenu, iIndex, MF_BYPOSITION);
}
}
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 1ad222c2d8..00f1cf85da 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1920,7 +1920,8 @@ LABEL_SHOWWINDOW:
case WM_RBUTTONUP:
hToolbarMenu = CreatePopupMenu();
for (int i = 0; i < _countof(toolbarButtons); i++) {
- MENUITEMINFO mii = { sizeof(mii) };
+ MENUITEMINFO mii = { 0 };
+ mii.cbSize = sizeof(mii);
mii.fMask = MIIM_ID | MIIM_STRING | MIIM_STATE | MIIM_DATA | MIIM_BITMAP;
mii.fType = MFT_STRING;
mii.fState = (g_dat.chatBbuttonVisibility & (1 << i)) ? MFS_CHECKED : MFS_UNCHECKED;