diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clc.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/proto_utils.cpp | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 0d23022956..d6baa3ff91 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -1304,8 +1304,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (!dat->fontInfo[i].changed)
DeleteObject(dat->fontInfo[i].hFont);
- if (dat->himlHighlight)
+ if (dat->himlHighlight) {
ImageList_Destroy(dat->himlHighlight);
+ dat->himlHighlight = NULL;
+ }
if (dat->hwndRenameEdit)
DestroyWindow(dat->hwndRenameEdit);
if (dat->hBmpBackground)
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index d00fbd27a8..ab8227f0fd 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -57,7 +57,7 @@ MIR_APP_DLL(void) Proto_EnumProtocols(int *nProtos, PROTOCOLDESCRIPTOR ***pProto MIR_APP_DLL(void) ProtoLogA(struct PROTO_INTERFACE *pThis, LPCSTR szFormat, va_list args)
{
char buf[4096];
- int res = _vsnprintf(buf, sizeof(buf), szFormat, args);
+ int res = _vsnprintf(buf, _countof(buf), szFormat, args);
CallService(MS_NETLIB_LOG, (WPARAM)(pThis ? pThis->m_hNetlibUser : NULL), (LPARAM)((res != -1) ? buf : CMStringA().FormatV(szFormat, args)));
}
|