don't return junk from wxHtmlTag::GetParamAsInt() if the parameter is not an integer (this resulted in practically infinite loop in table parsing code for bad HTML with incorrect colspan values)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f01a77c795
commit
3f6901ad7f
@ -524,11 +524,15 @@ bool wxHtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const
|
|||||||
|
|
||||||
bool wxHtmlTag::GetParamAsInt(const wxString& par, int *clr) const
|
bool wxHtmlTag::GetParamAsInt(const wxString& par, int *clr) const
|
||||||
{
|
{
|
||||||
if (!HasParam(par)) return false;
|
if ( !HasParam(par) )
|
||||||
|
return false;
|
||||||
|
|
||||||
long i;
|
long i;
|
||||||
bool succ = GetParam(par).ToLong(&i);
|
if ( !GetParam(par).ToLong(&i) )
|
||||||
|
return false;
|
||||||
|
|
||||||
*clr = (int)i;
|
*clr = (int)i;
|
||||||
return succ;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxHtmlTag::GetAllParams() const
|
wxString wxHtmlTag::GetAllParams() const
|
||||||
|
Loading…
Reference in New Issue
Block a user