diff options
author | George Hazan <ghazan@miranda.im> | 2017-09-04 21:30:26 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-09-04 21:30:26 +0300 |
commit | d4d99f08d3cb4dc3d8451c88fe366bfd699bb37a (patch) | |
tree | 79a2f4a5ecb01a23000767ae5d55c86f85db0f28 /protocols | |
parent | 9f80b5afceffa6853ac9ab410dd21a90b4ff7e1f (diff) |
fixes #915 (crash in IRC processing wrongly created PING command)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 6b32bf8c42..df1316ec8b 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -261,7 +261,10 @@ void __cdecl CIrcProto::ResolveIPThread(void *di) bool CIrcProto::OnIrc_PING(const CIrcMessage* pmsg)
{
wchar_t szResponse[100];
- mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
+ if (pmsg->parameters.getCount() > 0)
+ mir_snwprintf(szResponse, L"PONG %s", pmsg->parameters[0].c_str());
+ else
+ wcscpy(szResponse, L"PONG");
SendIrcMessage(szResponse);
return false;
}
|