mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 01:48:00 +02:00
Fix TJSArray._GetStrings: exit once you get correct value, do not fall through to raising error
This commit is contained in:
parent
e2dd3a09dc
commit
4c8f718a8b
@ -2797,14 +2797,14 @@ begin
|
||||
else
|
||||
begin
|
||||
Str(TJOB_Double(V).Value,S);
|
||||
Result:=S;
|
||||
Exit(S);
|
||||
end;
|
||||
if V is TJOB_String then
|
||||
Result:=TJOB_STRING(V).Value;
|
||||
Exit(TJOB_STRING(V).Value);
|
||||
finally
|
||||
V.Free;
|
||||
end;
|
||||
Raise EConvertError.CreateFmt('Element %d is not a valid integer value',[Index]);
|
||||
Raise EConvertError.CreateFmt('Element %d is not a valid string value',[Index]);
|
||||
end;
|
||||
|
||||
procedure TJSArray._SetBooleans(Index: NativeInt; aValue: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user