From 8326709fae1cb772df61b71c0bf344501d788924 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 16 Jun 2024 13:11:47 +0900 Subject: [PATCH] fix: set prec as max in case of hex --- include/toml11/parser.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/toml11/parser.hpp b/include/toml11/parser.hpp index 51d71c9..6abdf63 100644 --- a/include/toml11/parser.hpp +++ b/include/toml11/parser.hpp @@ -610,6 +610,10 @@ parse_floating(location& loc, const context& ctx) fmt.prec -= 1; } } + else if(fmt.fmt == floating_format::hex) + { + fmt.prec = std::numeric_limits::max_digits10; + } else { // width after decimal point