From 3c3d8be323e6630c28c2dac6e0e851bce4b02130 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 18:53:33 +0000 Subject: fix for strncat use git-svn-id: http://svn.miranda-ng.org/main/trunk@13649 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/ctrl_contact.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 2bdedb3ae5..4ed530558f 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -1425,7 +1425,7 @@ int CtrlContactWriteItemToDB( db_unset(hContact, pszModule, pszSetting); else { if (cbi.wFlags & CBEXIF_SMS) - mir_tstrncat(szVal, _T(" SMS"), SIZEOF(szVal)); + mir_tstrncat(szVal, _T(" SMS"), SIZEOF(szVal) - mir_tstrlen(szVal)); if (db_set_ts(hContact, pszModule, pszSetting, szVal)) return 1; } @@ -1475,7 +1475,7 @@ int CtrlContactWriteMyItemsToDB( while (CtrlContactWndProc(hCtrl, CBEXM_GETITEM, NULL, (LPARAM)&cbi) && cbi.iItem < 50) { if (!(cbi.wFlags & CBEXIF_DELETED) && *szVal) { if (cbi.wFlags & CBEXIF_SMS) { - mir_tstrncat(szVal, _T(" SMS"), SIZEOF(szVal)); + mir_tstrncat(szVal, _T(" SMS"), SIZEOF(szVal) - mir_tstrlen(szVal)); } mir_snprintf(pszSetting, SIZEOF(pszSetting), szFormatCat, i); if (*szCat && _tcsncmp(szCat, pszOther, ccOther)) { -- cgit v1.2.3