From dc0e53cbdd7e1d2dc75d1d1b978092d4bdce5840 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 20 May 2019 15:00:35 +0200 Subject: When testing for the spin control input bounds, test for the MIN_INT as well --- src/slic3r/GUI/Field.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/slic3r/GUI/Field.cpp') diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index 01fa9eedc..b3017813d 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -508,7 +508,7 @@ void SpinCtrl::BUILD() { long value; const bool parsed = e.GetString().ToLong(&value); - tmp_value = parsed && value <= INT_MAX ? (int)value : UNDEF_VALUE; + tmp_value = parsed && value >= INT_MIN && <= INT_MAX ? (int)value : UNDEF_VALUE; #ifdef __WXOSX__ // Forcibly set the input value for SpinControl, since the value -- cgit v1.2.3