diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 19aae087e6..048f936414 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 485cc7a826..84042f1493 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) {