summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-08-09 18:34:40 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-08-09 18:34:40 +0000
commitc74896729a243147287f46bfd752deaa8c0b9e64 (patch)
treeb0285ec7f33db11c138477b24498a17626185ac0 /plugins
parent672592096bcab453d8bfc14def7b8339f36a26ed (diff)
crash fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@14888 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp
index aa24ef077f..a838e205b6 100644
--- a/plugins/NewsAggregator/Src/CheckFeed.cpp
+++ b/plugins/NewsAggregator/Src/CheckFeed.cpp
@@ -37,7 +37,8 @@ LPCTSTR CheckFeed(TCHAR *tszURL, HWND hwndDlg)
int childcount = 0;
HXML node;
if (!mir_tstrcmpi(xmlGetName(hXml), _T("xml"))) {
- for (int i = 0; xmlGetAttrCount(hXml); i++) {
+ int attrcount = xmlGetAttrCount(hXml);
+ for (int i = 0; i < attrcount; i++) {
LPCTSTR szAttrName = xmlGetAttrName(hXml, i);
if (!mir_tstrcmpi(szAttrName, _T("encoding"))) {
codepage = xmlGetAttrValue(hXml, szAttrName);
@@ -207,7 +208,8 @@ void CheckCurrentFeed(MCONTACT hContact)
int childcount = 0;
HXML node;
if (!mir_tstrcmpi(xmlGetName(hXml), _T("xml"))) {
- for (int i = 0; xmlGetAttrCount(hXml); i++) {
+ int attrcount = xmlGetAttrCount(hXml);
+ for (int i = 0; i < attrcount; i++) {
LPCTSTR szAttrName = xmlGetAttrName(hXml, i);
if (!mir_tstrcmpi(szAttrName, _T("encoding"))) {
codepage = xmlGetAttrValue(hXml, szAttrName);