X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8703bc01c28e0397764cd28b915caf17a28020ad..1d451c5bd117cd7e7dcf3f1516049141093e46f0:/src/html/htmltag.cpp diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index 361aaa971a..a8e30676ec 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -4,7 +4,7 @@ // Author: Vaclav Slavik // RCS-ID: $Id$ // Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -127,7 +127,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source) ++pos; if (src[pos] == '<') ++pos; - + // see if it matches int match_pos = 0; while (pos < lng && match_pos < tag_len && src[pos] != '>' && src[pos] != '<') { @@ -135,7 +135,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source) // Unicode build if ((wxChar)wxToupper(src[pos]) == tagBuffer[match_pos]) { ++match_pos; - } + } else if (src[pos] == wxT(' ') || src[pos] == wxT('\n') || src[pos] == wxT('\r') || src[pos] == wxT('\t')) { // need to skip over these @@ -148,9 +148,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source) // found a match if (match_pos == tag_len) { - // These 2 lines commented: - //pos = pos - tag_len - 3; pos is not used outside of while loop - //stpos = pos; Value is local to while loop, no need to set it + pos = pos - tag_len - 3; break; } else {