Apparently the atof() function allows to convert a NAN string input to a
NAN float value.
That we don't want when you input values in our sliders! :)
This commit is contained in:
Ton Roosendaal
2006-07-11 08:56:46 +00:00
parent 1ce8f352bc
commit a8ad9880f4

View File

@@ -2051,7 +2051,9 @@ static int ui_act_as_text_but(uiBut *but)
}
}
else value = atof(str);
/* NAN detection */
if(isnan(value)) value= 0.0;
if(but->pointype!=FLO) value= (int)value;
if(value<min) value= min;