From 9bc95da04ca5541783c9aead91769fcde0651d97 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 29 Sep 2010 22:01:18 +0000 Subject: [PATCH] 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 --- demos/life/life.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.45.2