]> git.saurik.com Git - wxWidgets.git/commitdiff
assert that wxRound() argument is in the supported range
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Apr 2007 16:23:17 +0000 (16:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 30 Apr 2007 16:23:17 +0000 (16:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/math.h

index f1f4d889f75dd68c401c13447144778448853104..12443b630cfd0cd54f0e0b6b24ce32342f1e47c8 100644 (file)
 
     inline int wxRound(double x)
     {
+        wxASSERT_MSG( x > INT_MIN - 0.5 && x < INT_MAX + 0.5,
+                      _T("argument out of supported range") );
+
         #if defined(HAVE_ROUND)
             return int(round(x));
         #else