]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix assert about passing long as "%d" in wxXRC code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 1 Oct 2012 10:47:24 +0000 (10:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 1 Oct 2012 10:47:24 +0000 (10:47 +0000)
Closes #14718.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72603 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/xrc/xh_sizer.cpp

index 6a7e591bb37562a17f7bc629de4d5196b52b1438..6fbe286e9650b6351bbbd83b04a227e52a7065d7 100644 (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);
     }
 }