X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/312ebad4cd1fad97a79aaed7102611df88806410..0bd3b8eca1d6ef2749797f34216493fce0edd8d6:/src/mac/classic/spinbutt.cpp?ds=sidebyside diff --git a/src/mac/classic/spinbutt.cpp b/src/mac/classic/spinbutt.cpp index 3d1cd44c21..22e5baa67d 100644 --- a/src/mac/classic/spinbutt.cpp +++ b/src/mac/classic/spinbutt.cpp @@ -86,7 +86,12 @@ int wxSpinButton::GetMax() const int wxSpinButton::GetValue() const { - return m_value; + int n = m_value; + + if (n < m_min) n = m_min; + if (n > m_max) n = m_max; + + return n; } void wxSpinButton::SetValue(int val)