From 9e7681ec6ee71356e83627330723507df6f48f6d Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 16 Nov 2023 23:25:19 +0300 Subject: [PATCH] toml parser 'inf' and 'nan' support --- src/coders/toml.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/coders/toml.cpp b/src/coders/toml.cpp index 74338ad4..fb6bf773 100644 --- a/src/coders/toml.cpp +++ b/src/coders/toml.cpp @@ -226,6 +226,14 @@ void Reader::readSection(Section* section /*nullable*/) { if (section) { section->set(name, flag); } + } else if (identifier == "inf") { + if (section) { + section->set(name, INFINITY); + } + } else if (identifier == "nan") { + if (section) { + section->set(name, NAN); + } } } else if (c == '"' || c == '\'') { pos++;