Skip to content

Commit 822d573

Browse files
committed
implemented conversion from the string 'maxint' to Integer
1 parent 5c8f8bb commit 822d573

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Source/Base/Spring.pas

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6246,9 +6246,16 @@ function ConvStr2Float(const source: TValue; target: PTypeInfo;
62466246
function ConvStr2Ord(const source: TValue; target: PTypeInfo;
62476247
out value: TValue; const formatSettings: TFormatSettings): Boolean;
62486248
var
6249+
s: string;
62496250
i: Int64;
62506251
begin
6251-
Result := TryStrToInt64(source.AsString, i);
6252+
s := source.AsString;
6253+
Result := TryStrToInt64(s, i);
6254+
if not Result and SameText(Trim(s), 'maxint') then
6255+
begin
6256+
Result := True;
6257+
i := MaxInt;
6258+
end;
62526259
if Result then
62536260
value := TValue.FromOrdinal(target, i);
62546261
end;

0 commit comments

Comments
 (0)