From: Vadim Zeitlin Date: Wed, 29 Sep 2010 22:01:18 +0000 (+0000) Subject: Correct printf() format specifiers for long variables in life demo. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9bc95da04ca5541783c9aead91769fcde0651d97?hp=a65b84f43417c8d0d156d63ae12474b29d1a739c Correct printf() format specifiers for long variables in life demo. Fix asserts in 64 bit builds due to using %u (expecting 32 bit values on a typical Unix LP64 platform) for 64 bit long values. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/demos/life/life.cpp b/demos/life/life.cpp index 13376c261c..0402bd9944 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -354,10 +354,10 @@ void LifeFrame::UpdateInfoText() { wxString msg; - msg.Printf(_(" Generation: %u (T: %u ms), Population: %u "), + msg.Printf(_(" Generation: %lu (T: %lu ms), Population: %lu "), m_tics, m_topspeed? 0 : m_interval, - m_life->GetNumCells()); + static_cast(m_life->GetNumCells())); m_text->SetLabel(msg); }