don't return junk from wxHtmlTag::GetParamAsInt() if the parameter is not an integer [backport of r53432 from trunk]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@53433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-05-03 00:40:29 +00:00
parent 84e3b6cd27
commit 8072d933e8

View File

@@ -452,11 +452,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