Skip to content

Commit

Permalink
added char cast
Browse files Browse the repository at this point in the history
should fix the GCC unittest
  • Loading branch information
TinyTinni committed May 31, 2018
1 parent 48656a4 commit ecadcdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/nlohmann/detail/output/serializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class serializer
{
// we finish reading, but do not accept: string was incomplete
std::string sn(3,'\0');
snprintf(&sn[0], sn.size(), "%.2X", s.back());
snprintf(&sn[0], sn.size(), "%.2X", static_cast<uint8_t>(s.back()));
JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + sn));
}
}
Expand Down

0 comments on commit ecadcdb

Please sign in to comment.