Prevent constraint_error with GNAT.
1 files changed, 7 insertions(+), 6 deletions(-)

M src/json-data.adb
M src/json-data.adb +7 -6
@@ 150,13 150,14 @@ package body JSON.Data is
    end Create_Number;
 
    function Create_Number (Value : JSON_Float) return JSON_Number_Type is
+      Int_Val : Multi_precision_integers.Multi_int(20);
    begin
-      return JSON_Number_Type'(Ada.Finalization.Controlled with
-                               Type_Kind   => JSON_NUMBER,
-                               Float_Type  => True,
-                               Int_Value   =>
-                                 Multi_precision_integers.Multi (0),
-                               Float_Value => Value);
+      Multi_precision_integers.Fill (Int_Val, 0);
+      return (Ada.Finalization.Controlled with
+              Type_Kind   => JSON_NUMBER,
+              Float_Type  => True,
+              Int_Value   => Int_Val,
+              Float_Value => Value);
    end Create_Number;
 
    function Get_Value (Object : JSON_Number_Type) return JSON_Integer is