From 06f2a3dce9c2db6c80fbdc590b8b82960cd9e311 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Sat, 7 Jan 2023 12:21:25 -0800 Subject: [PATCH] Increase float to string precision to 17 --- src/idl_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index 360f0c744..06095e621 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -3903,7 +3903,7 @@ bool FieldDef::Deserialize(Parser &parser, const reflection::Field *field) { if (IsInteger(value.type.base_type)) { value.constant = NumToString(field->default_integer()); } else if (IsFloat(value.type.base_type)) { - value.constant = FloatToString(field->default_real(), 16); + value.constant = FloatToString(field->default_real(), 17); } presence = FieldDef::MakeFieldPresence(field->optional(), field->required()); padding = field->padding();