From acc6a7b1e6fb438e4534087f0a12cf1ab9dd3107 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 23 Jul 2013 17:47:07 +0000 Subject: revert of shamefully killed mir_vsntprintf git-svn-id: http://svn.miranda-ng.org/main/trunk@5455 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/chat/clist.cpp | 2 +- plugins/TabSRMM/src/chat/log.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/TabSRMM/src/chat') diff --git a/plugins/TabSRMM/src/chat/clist.cpp b/plugins/TabSRMM/src/chat/clist.cpp index b570c360f1..363e815947 100644 --- a/plugins/TabSRMM/src/chat/clist.cpp +++ b/plugins/TabSRMM/src/chat/clist.cpp @@ -267,7 +267,7 @@ BOOL CList_AddEvent(HANDLE hContact, HICON Icon, HANDLE event, int type, const T return FALSE; va_start(marker, fmt); - _vstprintf(szBuf, fmt, marker); //!!!!!!!! + mir_vsntprintf(szBuf, _tcslen(szBuf), fmt, marker); va_end(marker); cle.cbSize = sizeof(cle); diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 0d45441233..51ef5776b3 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -617,11 +617,11 @@ static int Log_AppendRTF(LOGSTREAMDATA* streamData, BOOL simpleMode, char **buff d += 5; } else if ((*line == '\\' || *line == '{' || *line == '}') && !streamData->bStripFormat) { *d++ = '\\'; - *d++ = (char) * line; + *d++ = (char)*line; } else if (*line > 0 && *line < 128) { - *d++ = (char) * line; + *d++ = (char)*line; } - else d += sprintf(d, "\\u%u ?", (WORD) * line); //!!!!!!!!! + else d += mir_snprintf(d, strlen(d), "\\u%u ?", (WORD)*line); } *cbBufferEnd = (int)(d - *buffer); -- cgit v1.2.3