X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9359369af901bf2146b5ad6575f7aae13389a15..99bc1313918e09582e45b7437d0d1680caca88ac:/src/html/htmlpars.cpp diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index a41e5358d4..75c98b5147 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -557,6 +557,9 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) const { unsigned code = 0; + if (entity.empty()) + return 0; // invalid entity reference + if (entity[0] == wxT('#')) { // NB: parsed value is a number, so it's OK to use wx_str(), internal @@ -843,9 +846,10 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) const while (substitutions[substitutions_cnt].code != 0) substitutions_cnt++; - wxHtmlEntityInfo *info = NULL; + wxHtmlEntityInfo *info; #ifdef __WXWINCE__ // bsearch crashes under WinCE for some reason + info = NULL; size_t i; for (i = 0; i < substitutions_cnt; i++) { @@ -893,7 +897,7 @@ public: protected: virtual void AddText(const wxString& WXUNUSED(txt)) {} - DECLARE_NO_COPY_CLASS(wxMetaTagParser) + wxDECLARE_NO_COPY_CLASS(wxMetaTagParser); }; class wxMetaTagHandler : public wxHtmlTagHandler @@ -906,7 +910,7 @@ public: private: wxString *m_retval; - DECLARE_NO_COPY_CLASS(wxMetaTagHandler) + wxDECLARE_NO_COPY_CLASS(wxMetaTagHandler); }; bool wxMetaTagHandler::HandleTag(const wxHtmlTag& tag)