From 0ad45d3e0e6ba155689f31cfd4355ec4735eeab9 Mon Sep 17 00:00:00 2001 From: Kevin Ollivier Date: Thu, 9 Nov 2017 15:02:49 -0800 Subject: [PATCH] Fix generic wxTimePickerCtrl to accept max values from keyboard Allow entering times such as 23:59:59 which were previously mistakenly flagged as invalid due to off by one error in the comparison in the validation function. --- src/generic/timectrlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/timectrlg.cpp b/src/generic/timectrlg.cpp index 445446e511..6a3033cd0c 100644 --- a/src/generic/timectrlg.cpp +++ b/src/generic/timectrlg.cpp @@ -492,7 +492,7 @@ private: // Check if the new value is acceptable. If not, we just handle // this digit as if it were the first one. int newValue = currentValue*10 + n; - if ( newValue < maxValue ) + if ( newValue <= maxValue ) { n = newValue;