Skip to content

Commit

Permalink
let _JL_Double/_JL_Extended parse null as 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Feb 8, 2023
1 parent 2fa2a84 commit 47d0364
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/mormot.core.json.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7430,7 +7430,7 @@ procedure _JL_Double(Data: PDouble; var Ctxt: TJsonParserContext);
if Ctxt.ParseNext then
begin
unaligned(Data^) := GetExtended(Ctxt.Value, err);
Ctxt.Valid := err = 0;
Ctxt.Valid := (Ctxt.Value = nil) or (err = 0);
end;
end;

Expand All @@ -7441,7 +7441,7 @@ procedure _JL_Extended(Data: PSynExtended; var Ctxt: TJsonParserContext);
if Ctxt.ParseNext then
begin
Data^ := GetExtended(Ctxt.Value, err);
Ctxt.Valid := err = 0;
Ctxt.Valid := (Ctxt.Value = nil) or (err = 0);
end;
end;

Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.0.4856'
'2.0.4857'

0 comments on commit 47d0364

Please sign in to comment.