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:
Vadim Zeitlin 2008-05-03 00:39:44 +00:00
parent f01a77c795
commit 3f6901ad7f

View File

@ -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