diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 6c2ad70bc..8fb4c332c 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -881,7 +881,7 @@ class binary_writer for (size_t i = 0; i < j.m_data.m_value.binary->size(); ++i) { oa->write_character(to_char_type(bjdata_draft3 ? 'B' : 'U')); - oa->write_character(j.m_data.m_value.binary->data()[i]); + oa->write_character(to_char_type(j.m_data.m_value.binary->data()[i])); } } diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 6f0132d20..f467c3998 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -17076,7 +17076,7 @@ class binary_writer for (size_t i = 0; i < j.m_data.m_value.binary->size(); ++i) { oa->write_character(to_char_type(bjdata_draft3 ? 'B' : 'U')); - oa->write_character(j.m_data.m_value.binary->data()[i]); + oa->write_character(to_char_type(j.m_data.m_value.binary->data()[i])); } }