fpspreadsheet: Fix expression parser crashing in GUI with comma as decimal separator.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7065 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-07-21 09:42:19 +00:00
parent de42ac0072
commit d310b3b9f2

View File

@ -1197,7 +1197,7 @@ var
begin begin
C := CurrentChar; C := CurrentChar;
prevC := #0; prevC := #0;
while (not IsWordDelim(C) or (prevC = 'E')) and (C <> cNull) do while (not IsWordDelim(C) or (prevC = 'E') or (C = FParser.FFormatSettings.DecimalSeparator)) and (C <> cNull) do
begin begin
if not ( IsDigit(C) if not ( IsDigit(C)
or ((FToken <> '') and (Upcase(C) = 'E')) or ((FToken <> '') and (Upcase(C) = 'E'))
@ -2054,7 +2054,6 @@ begin
exit; exit;
FFormatSettings := AFormatSettings; FFormatSettings := AFormatSettings;
UpdateExprFormatSettings; UpdateExprFormatSettings;
// ExprFormatSettings := AFormatSettings;
FExpression := AValue; FExpression := AValue;
if (AValue <> '') and (AValue[1] = '=') then if (AValue <> '') and (AValue[1] = '=') then
FScanner.Source := Copy(AValue, 2, Length(AValue)) FScanner.Source := Copy(AValue, 2, Length(AValue))