From f33a5bc61cb4f1ad6e4b43dec0f0fa4a2cfe1743 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 1 Oct 2012 10:47:24 +0000 Subject: [PATCH] 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 --- src/xrc/xh_sizer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index 6a7e591bb3..6fbe286e96 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -419,7 +419,8 @@ void wxSizerXmlHandler::SetGrowables(wxFlexGridSizer* sizer, break; } - if ( (int)l >= nslots ) + const int n = static_cast(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); } } -- 2.45.2