diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 45fcfff4..f0c73f1b 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -2278,7 +2278,7 @@ class binary_reader success = false; break; } - return std::char_traits::to_char_type(current); + result.push_back(std::char_traits::to_char_type(current)); }; return success; } @@ -2310,7 +2310,7 @@ class binary_reader success = false; break; } - return static_cast(current); + result.push_back(static_cast(current)); } return success; }