diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2013-01-02 03:52:40 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2013-01-02 03:52:40 +0000 |
commit | c674b7ec9522886d8371ba8a8bc9116c616d3279 (patch) | |
tree | 3996cc2ac5dd6429725e196be1fe3b66d32f68b5 /plugins/New_GPG | |
parent | d86463f8bec98d2456be02abbfe6c1c51cff095a (diff) |
fixed prescense sign verification bug
git-svn-id: http://svn.miranda-ng.org/main/trunk@2897 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG')
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index af1e942cc8..585f633e8b 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -934,7 +934,8 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface *ji, HXML node, voi if(_tcsstr(nodename2, _T("status")))
{
LPCTSTR status = xi.getText(local_node2);
- status_str = status;
+ if(status)
+ status_str = status;
break;
}
local_node2 = xi.getChild(node, n);
@@ -1892,26 +1893,26 @@ void strip_line_term(std::string &s) }
void strip_tags(std::wstring &str)
-{ - std::wstring::size_type p; - if(_tcslen(inopentag)) - { - for(p = str.find(inopentag); p != std::wstring::npos; p = str.find(inopentag)) - str.erase(p, _tcslen(inopentag)); - } - if(_tcslen(inclosetag)) - { - for(p = str.find(inclosetag); p != std::wstring::npos; p = str.find(inclosetag)) - str.erase(p, _tcslen(inclosetag)); - } - if(_tcslen(outopentag)) - { - for(p = str.find(outopentag); p != std::wstring::npos; p = str.find(outopentag)) - str.erase(p, _tcslen(outopentag)); - } - if(_tcslen(outclosetag)) - { - for(p = str.find(outclosetag); p != std::wstring::npos; p = str.find(outclosetag)) - str.erase(p, _tcslen(outclosetag)); - } +{
+ std::wstring::size_type p;
+ if(_tcslen(inopentag))
+ {
+ for(p = str.find(inopentag); p != std::wstring::npos; p = str.find(inopentag))
+ str.erase(p, _tcslen(inopentag));
+ }
+ if(_tcslen(inclosetag))
+ {
+ for(p = str.find(inclosetag); p != std::wstring::npos; p = str.find(inclosetag))
+ str.erase(p, _tcslen(inclosetag));
+ }
+ if(_tcslen(outopentag))
+ {
+ for(p = str.find(outopentag); p != std::wstring::npos; p = str.find(outopentag))
+ str.erase(p, _tcslen(outopentag));
+ }
+ if(_tcslen(outclosetag))
+ {
+ for(p = str.find(outclosetag); p != std::wstring::npos; p = str.find(outclosetag))
+ str.erase(p, _tcslen(outclosetag));
+ }
}
\ No newline at end of file |