X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6167969572298af47687cbb7ccba1aea202110ac..bb69632a56a827bed4cfae842bfffa88259ac1aa:/src/html/htmltag.cpp diff --git a/src/html/htmltag.cpp b/src/html/htmltag.cpp index cd17265698..0ad22af893 100644 --- a/src/html/htmltag.cpp +++ b/src/html/htmltag.cpp @@ -302,7 +302,7 @@ wxHtmlTag::wxHtmlTag(wxHtmlTag *parent, /* Find parameters and their values: */ - wxChar c; + wxChar c wxDUMMY_INITIALIZE(0); // fill-in name, params and begin pos: wxString::const_iterator i(pos+1); @@ -311,7 +311,7 @@ wxHtmlTag::wxHtmlTag(wxHtmlTag *parent, while ((i < end_pos) && ((c = *(i++)) != wxT(' ') && c != wxT('\r') && c != wxT('\n') && c != wxT('\t') && - c != wxT('>'))) + c != wxT('>') && c != wxT('/'))) { if ((c >= wxT('a')) && (c <= wxT('z'))) c -= (wxT('a') - wxT('A')); @@ -524,11 +524,15 @@ bool wxHtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const bool wxHtmlTag::GetParamAsInt(const wxString& par, int *clr) const { - if (!HasParam(par)) return false; + if ( !HasParam(par) ) + return false; + long i; - bool succ = GetParam(par).ToLong(&i); + if ( !GetParam(par).ToLong(&i) ) + return false; + *clr = (int)i; - return succ; + return true; } wxString wxHtmlTag::GetAllParams() const