]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix check in assert in wxULongLong::ToULong().
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Apr 2011 14:20:32 +0000 (14:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Apr 2011 14:20:32 +0000 (14:20 +0000)
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

include/wx/longlong.h

index ca687f68610e3a9d3a7d3d1ae9689c7a330e9e08..cd6b752d1e2d9b96eaeed0918381ff86b42a88aa 100644 (file)
@@ -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);