diff --git a/src/Desc.cc b/src/Desc.cc index 1d76c32e55..b64bcec8d8 100644 --- a/src/Desc.cc +++ b/src/Desc.cc @@ -145,7 +145,9 @@ void ODesc::Add(double d, bool no_exp) AddBytes(&d, sizeof(d)); else { - char tmp[256]; + // Buffer needs enough chars to store max. possible "double" value + // of 1.79e308 without using scientific notation. + char tmp[350]; if ( no_exp ) modp_dtoa3(d, tmp, sizeof(tmp), IsReadable() ? 6 : 8); diff --git a/testing/btest/Baseline/scripts.base.frameworks.logging.ascii-double/test.log b/testing/btest/Baseline/scripts.base.frameworks.logging.ascii-double/test.log index 45f8783c7b..9d5dd6ecf0 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.logging.ascii-double/test.log +++ b/testing/btest/Baseline/scripts.base.frameworks.logging.ascii-double/test.log @@ -3,7 +3,7 @@ #empty_field (empty) #unset_field - #path test -#open 2017-11-02-21-00-25 +#open 2017-11-06-19-58-08 #fields d #types double 2153226000.0 @@ -19,8 +19,8 @@ -50000.0 3140000000000000.0 -3140000000000000.0 -NAN.0 -NAN.0 +178999999999999996376899522972626047077637637819240219954027593177370961667659291027329061638406108931437333529420935752785895444161234074984843178962619172326295244262722141766382622299223626438470088150218987997954747866198184686628013966119769261150988554952970462018533787926725176560021258785656871583744.0 +-178999999999999996376899522972626047077637637819240219954027593177370961667659291027329061638406108931437333529420935752785895444161234074984843178962619172326295244262722141766382622299223626438470088150218987997954747866198184686628013966119769261150988554952970462018533787926725176560021258785656871583744.0 0.000012 0 -0 @@ -28,4 +28,4 @@ inf -inf 0.0 nan -#close 2017-11-02-21-00-25 +#close 2017-11-06-19-58-08