]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct checks for gradient stop position.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 6 Apr 2010 00:17:16 +0000 (00:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 6 Apr 2010 00:17:16 +0000 (00:17 +0000)
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
src/common/graphcmn.cpp

index 392c13044c63d3997e5aaf1d0d5e70d65a73f912..f2edd54ca30b25d0b6eb5c49c0ecc418431715db 100644 (file)
@@ -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;
     }
index b014460e0bceb77bedfb49fc53f70964a544301a..7ab4da0b5ca535759d92828398e0f17cc397f06f 100644 (file)
@@ -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" );
     }
 }