fpSQLParser: fix float literal parsing (make it locale-independent)

git-svn-id: trunk@49564 -
This commit is contained in:
ondrej 2021-06-26 16:05:37 +00:00
parent d4b4950ae4
commit 48f259589b

View File

@ -2241,6 +2241,9 @@ end;
function TSQLParser.CreateLiteral(AParent : TSQLElement) : TSQLLiteral;
var
SQLFS: TFormatSettings;
begin
Result:=Nil;
Case CurrentToken of
@ -2257,7 +2260,9 @@ begin
tsqlFloatNumber:
begin
Result:=TSQLLiteral(CreateElement(TSQLFloatLiteral,AParent));
TSQLFloatLiteral(Result).Value:=StrToFloat(CurrentTokenString);
SQLFS:=DefaultFormatSettings;
SQLFS.DecimalSeparator:='.';
TSQLFloatLiteral(Result).Value:=StrToFloat(CurrentTokenString,SQLFS);
end;
tsqlNull :
Result:=TSQLLiteral(CreateElement(TSQLNullLiteral,AParent));