diff options
author | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:57:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-09-22 14:57:06 +0000 |
commit | 97c3f6fe20b6474159beb924c6707bef481faa14 (patch) | |
tree | 874a46db938a12b54b88e04f6324e6fece8bb3de /protocols/JabberG/src/jabber_search.cpp | |
parent | fc3a4607ee5cfe9e7cfed8d63e2cb1d549f61d92 (diff) |
correct last _tcsncpy_s parameter's value
git-svn-id: http://svn.miranda-ng.org/main/trunk@10558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_search.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 177bc5e70c..78e2feaabb 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -251,7 +251,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M Results.jsr.hdr.cbSize = sizeof(Results.jsr); // sending user data
for (i=0; i < nUsersFound; i++) {
- TCHAR buff[200]=_T("");
+ TCHAR buff[200]; buff[0] = 0;
Results.jsr.jid[0]=0;
U_TCHAR_MAP * pmUserData = (U_TCHAR_MAP *) plUsersInfo->operator [](i);
for (int j=0; j < nFieldCount; j++) {
@@ -259,7 +259,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M TCHAR* value = pmUserData->operator [](var);
Results.pszFields[j] = value ? value : (TCHAR *)_T(" ");
if (!_tcsicmp(var,_T("jid")) && value)
- _tcsncpy_s(Results.jsr.jid, value, SIZEOF(Results.jsr.jid));
+ _tcsncpy_s(Results.jsr.jid, value, _TRUNCATE);
}
{
TCHAR * nickfields[]={ _T("nick"), _T("nickname"),
@@ -272,7 +272,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M if (_tcsicmp(nick, Results.jsr.jid))
mir_sntprintf(buff, SIZEOF(buff), _T("%s (%s)"), nick, Results.jsr.jid);
else
- _tcsncpy_s(buff, nick, SIZEOF(buff));
+ _tcsncpy_s(buff, nick, _TRUNCATE);
Results.jsr.hdr.nick = nick ? buff : NULL;
Results.jsr.hdr.flags = PSR_TCHAR;
}
|