summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-16 18:38:16 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-16 18:38:16 +0000
commit876268848bfdd6a668ac08f8e767fb8e2a6ca3dc (patch)
tree80cb50982e6b30be885c6020b175a5acaaf1d47b /plugins/SeenPlugin/src/utils.cpp
parentd1e9f47248373ff837c8dd4e02c96414d2a4405b (diff)
fix for strncat use
git-svn-id: http://svn.miranda-ng.org/main/trunk@13644 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SeenPlugin/src/utils.cpp')
-rw-r--r--plugins/SeenPlugin/src/utils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 64fa20c6c9..c8de06f57b 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -299,8 +299,8 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "StatusTriger" : courProtoName, 0)) {
_tcsncpy(szdbsetting, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)(isetting | 0x8000), GSMDF_TCHAR), SIZEOF(szdbsetting));
if (!(isetting & 0x8000)) {
- _tcsncat(szdbsetting, _T("/"), SIZEOF(szdbsetting));
- _tcsncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting));
+ _tcsncat(szdbsetting, _T("/"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
+ _tcsncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
}
charPtr = szdbsetting;
goto LBL_charPtr;
@@ -319,8 +319,8 @@ TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
if (isetting = db_get_w(hcontact, S_MOD, hcontact ? "OldStatus" : courProtoName, 0)) {
_tcsncpy(szdbsetting, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)isetting, GSMDF_TCHAR), SIZEOF(szdbsetting));
if (includeIdle && hcontact && db_get_b(hcontact, S_MOD, "OldIdle", 0)) {
- _tcsncat(szdbsetting, _T("/"), SIZEOF(szdbsetting));
- _tcsncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting));
+ _tcsncat(szdbsetting, _T("/"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
+ _tcsncat(szdbsetting, TranslateT("Idle"), SIZEOF(szdbsetting) - mir_tstrlen(szdbsetting));
}
charPtr = szdbsetting;
goto LBL_charPtr;