diff --git a/rai/utility.hpp b/rai/utility.hpp index 38a1d899..fc76c286 100644 --- a/rai/utility.hpp +++ b/rai/utility.hpp @@ -74,10 +74,15 @@ bool fetch_object (T & object, std::iostream & stream_a) error = object.deserialize_json (updated, tree); if (!error && updated) { + auto end (stream_a.tellp ()); stream_a.seekp (0); try { boost::property_tree::write_json (stream_a, tree); + while (stream_a.tellp () != end) + { + stream_a << ' '; + } } catch (std::runtime_error const &) {