From 777da6a8fa210d027e5fd47919a8d7c18b9c5613 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Mon, 1 Dec 2014 00:52:05 +0000 Subject: fix buf size for mir_sntprintf() git-svn-id: http://svn.miranda-ng.org/main/trunk@11186 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clistmenus.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 2fe2157340..11e6bafaaf 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -108,9 +108,9 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) mi.ptszName = FAVMENUROOTNAME; else { TCHAR *str1 = TranslateTS(FAVMENUROOTNAME), *str2 = TranslateTS(rates[bContactRate]); - int bufsize = (mir_tstrlen(str1) + mir_tstrlen(str2) + 15) * sizeof(TCHAR); + size_t bufsize = (mir_tstrlen(str1) + mir_tstrlen(str2) + 15) * sizeof(TCHAR); TCHAR *name = (TCHAR *)_alloca(bufsize); - mir_sntprintf(name, bufsize / sizeof(TCHAR), _T("%s (%s)"), str1, str2); + mir_sntprintf(name, (bufsize / sizeof(TCHAR)), _T("%s (%s)"), str1, str2); mi.ptszName = name; mi.flags |= CMIF_KEEPUNTRANSLATED; } -- cgit v1.2.3