Skip to content

Commit 47d0364

Browse files
author
Arnaud Bouchez
committed
let _JL_Double/_JL_Extended parse null as 0
1 parent 2fa2a84 commit 47d0364

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/mormot.core.json.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7430,7 +7430,7 @@ procedure _JL_Double(Data: PDouble; var Ctxt: TJsonParserContext);
74307430
if Ctxt.ParseNext then
74317431
begin
74327432
unaligned(Data^) := GetExtended(Ctxt.Value, err);
7433-
Ctxt.Valid := err = 0;
7433+
Ctxt.Valid := (Ctxt.Value = nil) or (err = 0);
74347434
end;
74357435
end;
74367436

@@ -7441,7 +7441,7 @@ procedure _JL_Extended(Data: PSynExtended; var Ctxt: TJsonParserContext);
74417441
if Ctxt.ParseNext then
74427442
begin
74437443
Data^ := GetExtended(Ctxt.Value, err);
7444-
Ctxt.Valid := err = 0;
7444+
Ctxt.Valid := (Ctxt.Value = nil) or (err = 0);
74457445
end;
74467446
end;
74477447

src/mormot.commit.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
'2.0.4856'
1+
'2.0.4857'

0 commit comments

Comments
 (0)