From f869380300b7f278000ac65ee0f8869fe9f8d520 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 17:38:34 +0000 Subject: fix for strncat use git-svn-id: http://svn.miranda-ng.org/main/trunk@13626 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_rowtemplateopt.cpp | 2 +- plugins/Clist_modern/src/modern_viewmodebar.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp index fd468c8d70..1ee8cad17d 100644 --- a/plugins/Clist_modern/src/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/src/modern_rowtemplateopt.cpp @@ -326,7 +326,7 @@ void RefreshTree(HWND hwndDlg, HTREEITEM hti) else mir_sntprintf(buf, SIZEOF(buf), TranslateT("%s, contain %s"), TranslateTS(types[cell->type]), cell->cont != TC_COL ? TranslateT("columns") : TranslateT("lines")); } - if (cell->layer) mir_tstrncat(buf, TranslateT(" layered"), _TRUNCATE); + if (cell->layer) mir_tstrncat(buf, TranslateT(" layered"), SIZEOF(buf) - mir_tstrlen(buf)); tvi.mask = TVIF_HANDLE | TVIF_TEXT; tvi.pszText = buf; TreeView_SetItem(htree, &tvi); diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index a5af9e501b..da921d125b 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -391,8 +391,8 @@ void SaveState() item.cchTextMax = SIZEOF(szTemp); item.iItem = i; SendMessageA(hwndList, LVM_GETITEMA, 0, (LPARAM)&item); - mir_strncat(newProtoFilter, szTemp, _TRUNCATE); - mir_strncat(newProtoFilter, "|", _TRUNCATE); + mir_strncat(newProtoFilter, szTemp, SIZEOF(newProtoFilter) - mir_strlen(newProtoFilter)); + mir_strncat(newProtoFilter, "|", SIZEOF(newProtoFilter) - mir_strlen(newProtoFilter)); newProtoFilter[2047] = 0; } } -- cgit v1.2.3