diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 18:48:46 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-16 18:48:46 +0000 |
commit | 942b909abaf0bba3fc5dedfa19dc9a2121960f05 (patch) | |
tree | 94249ba2456c23959322d4f8ec167d6b24473f00 /plugins/TabSRMM | |
parent | a5e72bd4459091b5712a6b10621233dba4e6e5af (diff) |
fix for strncat use
git-svn-id: http://svn.miranda-ng.org/main/trunk@13648 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 0765a23fc8..7f3bf5ba3a 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -517,10 +517,10 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) TCHAR *szPreview = GetPreviewT(dbe.eventType, &dbe);
if (szPreview) {
- _tcsncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, MAX_SECONDLINE);
+ _tcsncat(pdata->eventData[pdata->nrMerged].tszText, szPreview, SIZEOF(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
mir_free(szPreview);
}
- else _tcsncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), MAX_SECONDLINE);
+ else _tcsncat(pdata->eventData[pdata->nrMerged].tszText, _T(" "), SIZEOF(pdata->eventData[pdata->nrMerged].tszText) - mir_tstrlen(pdata->eventData[pdata->nrMerged].tszText));
pdata->eventData[pdata->nrMerged].tszText[MAX_SECONDLINE - 1] = 0;
@@ -544,7 +544,7 @@ static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent) }
i = (available > 0) ? i + 1 : i + 2;
for (; i <= pdata->nrMerged; i++)
- _tcsncat(lpzText, pdata->eventData[i].tszText, SIZEOF(lpzText));
+ _tcsncat(lpzText, pdata->eventData[i].tszText, SIZEOF(lpzText) - mir_tstrlen(lpzText));
pdata->eventData[pdata->nrMerged].hEvent = hEvent;
pdata->eventData[pdata->nrMerged].timestamp = dbe.timestamp;
|