fpexprpars: fix access violation when setting an expression after clear
Summary
- Calls
FreeAndNil
inTFPExpressionParser.Clear
- Remove redundant assignment of FExprNode to nil in SetExpression (it always be nil)
- Add test case for the bug
- Use compatible FormatSettings when testing float values (fix fpexprpars tests when system use a non US format settings)
What is the current bug behavior?
Setting a new Expression after calling Clear
gives an access violation because the code that parses the expression tries to access an invalid address at FExprNode
What is the behavior after applying this patch?
Setting an Expression after Clear works