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