diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-19 21:02:03 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-19 21:02:03 +0000 |
commit | a43a58c37fd092587b7440549d53e73c3d620b22 (patch) | |
tree | ddf2b3abf25ab51960a3f37e27b81ad48eb8d4af /protocols/JabberG/jabber_svc.cpp | |
parent | 0209d850096e85caf6454098b6c89c8022a1d97f (diff) |
less extravagant version of mir_sntptinf usage
git-svn-id: http://svn.miranda-ng.org/main/trunk@92 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/jabber_svc.cpp')
-rw-r--r-- | protocols/JabberG/jabber_svc.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/JabberG/jabber_svc.cpp b/protocols/JabberG/jabber_svc.cpp index b64772f543..31ff002999 100644 --- a/protocols/JabberG/jabber_svc.cpp +++ b/protocols/JabberG/jabber_svc.cpp @@ -387,11 +387,15 @@ static void appendString( bool bIsTipper, const TCHAR* tszTitle, const TCHAR* ts _tcsncat( buf, szSeparator, bufSize );
}
+ size_t len = _tcslen(buf);
+ buf += len;
+ bufSize -= len;
+
if ( bIsTipper )
- mir_sntprintf(buf, bufSize, _T("%s%s%s%s%s"), buf, _T("<b>"), TranslateTS(tszTitle), _T("</b>\t"), tszValue);
+ mir_sntprintf(buf, bufSize, _T("%s%s%s%s"), _T("<b>"), TranslateTS(tszTitle), _T("</b>\t"), tszValue);
else {
TCHAR* p = TranslateTS(tszTitle);
- mir_sntprintf(buf, bufSize, _T("%s%s%s\t"), buf, p, _tcslen(p)>7 ? _T("\t") : _T(""), tszValue);
+ mir_sntprintf(buf, bufSize, _T("%s%s\t"), p, _tcslen(p)>7 ? _T("\t") : _T(""), tszValue);
}
}
|