diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 19aae087..048f9364 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -64,7 +64,7 @@ class binary_reader const bool strict = true) { sax = sax_; - bool result; + bool result = false; switch (format) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 485cc7a8..84042f14 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -6033,7 +6033,7 @@ class binary_reader const bool strict = true) { sax = sax_; - bool result; + bool result = false; switch (format) {