From b16643b6fc9abb5c243a1d83cfe0da93c441bb2c Mon Sep 17 00:00:00 2001 From: Nicolas Mattia Date: Thu, 23 Dec 2021 14:12:48 +0100 Subject: [PATCH] Use int64_t and NixFloat in fromTOML types This makes sure that values parsed from TOML have a proper size. Using e.g. `double` caused issues on i686 where the size of `double` (32bit) was too small to accommodate some values. --- src/libexpr/primops/fromTOML.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libexpr/primops/fromTOML.cc b/src/libexpr/primops/fromTOML.cc index bfea1ce34..221c40db9 100644 --- a/src/libexpr/primops/fromTOML.cc +++ b/src/libexpr/primops/fromTOML.cc @@ -47,10 +47,10 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va mkBool(v, toml::get(t)); break;; case toml::value_t::integer: - mkInt(v, toml::get(t)); + mkInt(v, toml::get(t)); break;; case toml::value_t::floating: - mkFloat(v, toml::get(t)); + mkFloat(v, toml::get(t)); break;; case toml::value_t::string: mkString(v, toml::get(t));