From: Vadim Zeitlin Date: Thu, 28 Apr 2011 14:20:32 +0000 (+0000) Subject: Fix check in assert in wxULongLong::ToULong(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ebbbd51bbcedacd72feb7ff81471365ee2141b22 Fix check in assert in wxULongLong::ToULong(). We can convert values up to ULONG_MAX to unsigned long losslessly, not up to LONG_MAX. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67641 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/longlong.h b/include/wx/longlong.h index ca687f6861..cd6b752d1e 100644 --- a/include/wx/longlong.h +++ b/include/wx/longlong.h @@ -404,7 +404,7 @@ public: // convert to ulong with range checking in debug mode (only!) unsigned long ToULong() const { - wxASSERT_MSG( m_ll <= LONG_MAX, + wxASSERT_MSG( m_ll <= ULONG_MAX, wxT("wxULongLong to long conversion loss of precision") ); return wx_truncate_cast(unsigned long, m_ll);