From: Vadim Zeitlin Date: Mon, 30 Apr 2007 16:23:17 +0000 (+0000) Subject: assert that wxRound() argument is in the supported range X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f11af0933155f94c7de5934738b0407c89e16e3f assert that wxRound() argument is in the supported range git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/math.h b/include/wx/math.h index f1f4d889f7..12443b630c 100644 --- a/include/wx/math.h +++ b/include/wx/math.h @@ -107,6 +107,9 @@ 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