summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-19 21:02:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-19 21:02:03 +0000
commita43a58c37fd092587b7440549d53e73c3d620b22 (patch)
treeddf2b3abf25ab51960a3f37e27b81ad48eb8d4af /protocols/JabberG
parent0209d850096e85caf6454098b6c89c8022a1d97f (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')
-rw-r--r--protocols/JabberG/jabber_svc.cpp8
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);
}
}