diff options
author | Ton Roosendaal <ton@blender.org> | 2006-07-11 12:56:46 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-07-11 12:56:46 +0400 |
commit | a8ad9880f4b40326a26ff2e0609444e12413dcce (patch) | |
tree | 4084f5fbe45ed067304c4ef772d1dc59825def07 /source | |
parent | 1ce8f352bc5f86bf7d0015e80f3570e04768c9ce (diff) |
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! :)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index a9baa3ecd19..8637bace852 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -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; |