From c74896729a243147287f46bfd752deaa8c0b9e64 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 9 Aug 2015 18:34:40 +0000 Subject: crash fix git-svn-id: http://svn.miranda-ng.org/main/trunk@14888 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewsAggregator/Src/CheckFeed.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') 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); -- cgit v1.2.3