summaryrefslogtreecommitdiff
path: root/protocols/JabberG/jabber_svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG/jabber_svc.cpp')
-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);
}
}