* Add range check to trystrtoint

This commit is contained in:
michael 2021-04-28 09:35:19 +00:00
parent dd8c294f2b
commit cbcc6c63b8

View File

@ -4664,12 +4664,9 @@ Var
begin
Result:=TryStrToInt(S,NI);
Result:=Result and (-2147483648<=NI) and (NI<=2147483647);
if Result then
begin
res:=NI;
if (NI<low(res)) or (NI>high(res)) then
Result:=false;
end;
end;