Fix assert about passing long as "%d" in wxXRC code.

Closes #14718.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-10-01 10:47:24 +00:00
parent bdc43642fb
commit f33a5bc61c

View File

@@ -419,7 +419,8 @@ void wxSizerXmlHandler::SetGrowables(wxFlexGridSizer* sizer,
break;
}
if ( (int)l >= nslots )
const int n = static_cast<int>(l);
if ( n >= nslots )
{
ReportParamError
(
@@ -428,7 +429,7 @@ void wxSizerXmlHandler::SetGrowables(wxFlexGridSizer* sizer,
(
"invalid %s index %d: must be less than %d",
rows ? "row" : "column",
l,
n,
nslots
)
);
@@ -438,9 +439,9 @@ void wxSizerXmlHandler::SetGrowables(wxFlexGridSizer* sizer,
}
if (rows)
sizer->AddGrowableRow(l);
sizer->AddGrowableRow(n);
else
sizer->AddGrowableCol(l);
sizer->AddGrowableCol(n);
}
}