fixed trystrtoint checking bounds

This commit is contained in:
mattias 2021-04-28 09:23:04 +00:00
parent 978399db4a
commit d72e3a0770

View File

@ -4403,7 +4403,11 @@ Var
begin
Result:=TryStrToInt(S,NI);
if Result then
begin
res:=NI;
if (NI<low(res)) or (NI>high(res)) then
Result:=false;
end;
end;
function TryStrToInt(const S: String; out res: NativeInt): Boolean;