diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 18:53:33 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 18:53:33 +0000 |
commit | 3c3d8be323e6630c28c2dac6e0e851bce4b02130 (patch) | |
tree | 7efe1f45c8fda6d83a69283445fa283803e501b3 /plugins/UserInfoEx/src/ctrl_contact.cpp | |
parent | 942b909abaf0bba3fc5dedfa19dc9a2121960f05 (diff) |
fix for strncat use
git-svn-id: http://svn.miranda-ng.org/main/trunk@13649 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/ctrl_contact.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ctrl_contact.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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)) {
|