Acc. to the callstack (i can confirm TS' issue): the culprit is a Call to SysUtils.StrToInt in dbf_prscore TCustomExpressionParser.ParseString (line 968 in dbf_prscore for fpc3.2.2 on my installation).
In TS' case we would need a Call to StrToInt64 instead
At first glance i'd consider it a bug, which would need to be reported on bugtracker.
EDIT: I don't have Trunk/Main.
Could someone compare in Trunk/Main " dbf_prscore --> TCustomExpressionParser.ParseString"?
Inside that Procedure there are 2 calls to StrToInt, but my money is on the second one (the first appearance of StrToint has to do with hexadecimal).
EDIT2: Nother stumbling block inside ParseString is probably the whole line 968
TempWord := TIntegerConstant.Create(StrToInt(W));
"TIntegerConstant"
and in dbf_prsdef the Value is an "Integer".
Notabene: in dbf_prsdef there is also a "TLargeIntConstant"......