From 3784bf308fe29d37b723a9601517fb97559ba39c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 6 Apr 2010 00:17:16 +0000 Subject: [PATCH] Correct checks for gradient stop position. It may be <= 1 in the final version and not < 1. See #11897. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/graphics.h | 2 +- src/common/graphcmn.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/graphics.h b/include/wx/graphics.h index 392c13044c..f2edd54ca3 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -323,7 +323,7 @@ public: float GetPosition() const { return m_pos; } void SetPosition(float pos) { - wxASSERT_MSG( pos >= 0 && pos < 1, "invalid gradient stop position" ); + wxASSERT_MSG( pos >= 0 && pos <= 1, "invalid gradient stop position" ); m_pos = pos; } diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index b014460e0b..7ab4da0b5c 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -520,7 +520,7 @@ void wxGraphicsGradientStops::Add(const wxGraphicsGradientStop& stop) } else { - wxFAIL_MSG( "invalid gradient stop position >= 1" ); + wxFAIL_MSG( "invalid gradient stop position > 1" ); } } -- 2.47.2