Bugfix #4661
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user