Commit 0dad6e4b authored by Philip Trettner's avatar Philip Trettner
Browse files

conversion fix

parent 085d9130
...@@ -73,7 +73,7 @@ std::basic_ostream<CharT, StreamTraits>& operator<<(std::basic_ostream<CharT, St ...@@ -73,7 +73,7 @@ std::basic_ostream<CharT, StreamTraits>& operator<<(std::basic_ostream<CharT, St
template <int w, class CharT, class StreamTraits> template <int w, class CharT, class StreamTraits>
std::basic_ostream<CharT, StreamTraits>& operator<<(std::basic_ostream<CharT, StreamTraits>& out, fixed_uint<w> const& val) std::basic_ostream<CharT, StreamTraits>& operator<<(std::basic_ostream<CharT, StreamTraits>& out, fixed_uint<w> const& val)
{ {
char buf[w * 20 + 1]; CharT buf[w * 20 + 1];
auto const end = buf + sizeof(buf); auto const end = buf + sizeof(buf);
auto begin = end; auto begin = end;
*(--begin) = '\0'; *(--begin) = '\0';
...@@ -82,10 +82,10 @@ std::basic_ostream<CharT, StreamTraits>& operator<<(std::basic_ostream<CharT, St ...@@ -82,10 +82,10 @@ std::basic_ostream<CharT, StreamTraits>& operator<<(std::basic_ostream<CharT, St
{ {
auto const n = u64(u % 10); auto const n = u64(u % 10);
u /= 10; u /= 10;
*(--begin) = '0' + n; *(--begin) = CharT('0' + n);
} }
if (begin + 1 == end) if (begin + 1 == end)
*(--begin) = '0'; *(--begin) = CharT('0');
return out << begin; return out << begin;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment