mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-16 09:59:04 +02:00
fixed trystrtoint checking bounds
This commit is contained in:
parent
978399db4a
commit
d72e3a0770
@ -4403,7 +4403,11 @@ Var
|
|||||||
begin
|
begin
|
||||||
Result:=TryStrToInt(S,NI);
|
Result:=TryStrToInt(S,NI);
|
||||||
if Result then
|
if Result then
|
||||||
|
begin
|
||||||
res:=NI;
|
res:=NI;
|
||||||
|
if (NI<low(res)) or (NI>high(res)) then
|
||||||
|
Result:=false;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TryStrToInt(const S: String; out res: NativeInt): Boolean;
|
function TryStrToInt(const S: String; out res: NativeInt): Boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user