X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7a4d01bdbb5c23d8f2025072f66ca91d3657bf3..0bafad0cf468cdd3b035ec8eb33e30a4e93eee42:/src/html/htmlpars.cpp diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 1d9b99c7f6..4cec1c5cd1 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -12,7 +12,7 @@ #pragma implementation #endif -#include +#include "wx/wxprec.h" #include "wx/defs.h" #if wxUSE_HTML @@ -22,7 +22,7 @@ #endif #ifndef WXPRECOMP -#include +#include "wx/wx.h" #endif #include "wx/tokenzr.h" @@ -81,7 +81,7 @@ void wxHtmlParser::DoParsing(int begin_pos, int end_pos) i = begin_pos; while (i < end_pos) { - c = m_Source[i]; + c = m_Source[(unsigned int) i]; // continue building word: if (c != '<') { @@ -173,7 +173,12 @@ void wxHtmlParser::PopTagHandler() { wxNode *first; - if (m_HandlersStack == NULL || (first = m_HandlersStack -> GetFirst()) == NULL) return; + if (m_HandlersStack == NULL || + (first = m_HandlersStack -> GetFirst()) == NULL) + { + wxLogWarning(_("Warning: attempt to remove HTML tag handler from empty stack.")); + return; + } m_HandlersHash = *((wxHashTable*) first -> GetData()); m_HandlersStack -> DeleteNode(first); }