Permalink
Browse files

fixed leading '0' digits in write_raw

  • Loading branch information...
1 parent c7ca4cf commit 65025d6a9b78162d4315547a80c82c8cc3761164 @Neverlord Neverlord committed Sep 6, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/string_serialization.cpp
@@ -165,7 +165,9 @@ class string_serializer : public serializer {
auto last = first + num_bytes;
out << hex;
out << setfill('0');
- copy(first, last, ostream_iterator<size_t>(out));
+ for (; first != last; ++first) {
+ out << setw(2) << static_cast<size_t>(*first);
+ }
out << dec;
m_after_value = true;
}

0 comments on commit 65025d6

Please sign in to comment.