fix the problem with parsing HTML comments (closes bug 1116708; based on patch 1168583)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -68,11 +68,18 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
|
||||
m_CacheSize = 0;
|
||||
m_CachePos = 0;
|
||||
|
||||
int pos = 0;
|
||||
while (pos < lng)
|
||||
for ( int pos = 0; pos < lng; pos++ )
|
||||
{
|
||||
if (src[pos] == wxT('<')) // tag found:
|
||||
{
|
||||
// don't cache comment tags
|
||||
wxString::const_iterator iter = source.begin() + pos;
|
||||
if ( wxHtmlParser::SkipCommentTag(iter, source.end()) )
|
||||
{
|
||||
pos = iter - source.begin();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m_CacheSize % CACHE_INCREMENT == 0)
|
||||
m_Cache = (wxHtmlCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(wxHtmlCacheItem));
|
||||
int tg = m_CacheSize++;
|
||||
@@ -169,8 +176,6 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pos++;
|
||||
}
|
||||
|
||||
// ok, we're done, now we'll free .Name members of cache - we don't need it anymore:
|
||||
|
Reference in New Issue
Block a user