mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 19:49:46 +02:00
* NativeInt size depends on platform.
This commit is contained in:
parent
93937f99ae
commit
4016e1acca
@ -2058,6 +2058,7 @@ function TJSArray._GetNativeInts(Index: NativeInt): NativeInt;
|
||||
|
||||
var
|
||||
V : TJOB_JSValue;
|
||||
I64 : Int64;
|
||||
|
||||
begin
|
||||
V:=Elements[Index];
|
||||
@ -2067,8 +2068,11 @@ begin
|
||||
Exit(Round(TJOB_Double(V).Value));
|
||||
if V is TJOB_String then
|
||||
begin
|
||||
if TryStrToInt64(TJOB_STRING(V).Value,Result) then
|
||||
if TryStrToInt64(TJOB_STRING(V).Value,I64) then
|
||||
begin
|
||||
Result:=I64;
|
||||
Exit
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
V.Free;
|
||||
|
Loading…
Reference in New Issue
Block a user