From 537830071b6bf2950d62f20a3ad5b4dd2cea414d Mon Sep 17 00:00:00 2001 From: Simon Gene Gottlieb Date: Tue, 9 Jul 2024 16:26:33 +0200 Subject: [PATCH] fix: increase buffer to fit exponents for double values --- include/yaml-cpp/fp_to_string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/yaml-cpp/fp_to_string.h b/include/yaml-cpp/fp_to_string.h index f5867d5ba..dd3557a51 100644 --- a/include/yaml-cpp/fp_to_string.h +++ b/include/yaml-cpp/fp_to_string.h @@ -102,7 +102,7 @@ auto fp_to_string(T v, int precision) -> std::string { } } - std::array output_buffer; // max digits of size_t plus sign, a dot and 4 letters for the exponent + std::array output_buffer; // max digits of size_t plus sign, a dot and 2 letters for 'e+' or 'e-' and 4 letters for the exponent auto output_ptr = &output_buffer[0]; // print '-' symbol for negative numbers