From 8dac56b6bea30d5c0047c1926e2c1cc3bbbdafd5 Mon Sep 17 00:00:00 2001 From: Guffawaffle Date: Wed, 28 Oct 2026 21:36:19 -0500 Subject: [PATCH] Use portable JSON parsing for fleet sync numbers --- mods/src/patches/parts/sync.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/src/patches/parts/sync.cc b/mods/src/patches/parts/sync.cc index 6f64bdd2c..68483eea6 100644 --- a/mods/src/patches/parts/sync.cc +++ b/mods/src/patches/parts/sync.cc @@ -2483,7 +2483,11 @@ namespace deployed_fleets char buffer[32]; double widened = value; if (const auto [end, ec] = std::to_chars(std::begin(buffer), std::end(buffer), value); ec == std::errc{}) { - std::from_chars(std::begin(buffer), end, widened); + // Floating-point from_chars requires macOS 26; use the existing JSON parser on supported clients. + auto parsed = nlohmann::json::parse(std::begin(buffer), end, nullptr, false); + if (parsed.is_number()) { + return parsed; + } } return widened; }