--- boost\iostreams\detail\adapter\non_blocking_adapter.hpp (current revision) +++ boost\iostreams\detail\adapter\non_blocking_adapter.hpp (working copy) @@ -25,13 +25,14 @@ { }; explicit non_blocking_adapter(Device& dev) : device_(dev) { } std::streamsize read(char_type* s, std::streamsize n) { std::streamsize result = 0; while (result < n) { - std::streamsize amt = iostreams::read(device_, s, n); + std::streamsize amt = + iostreams::read(device_, s + result, n - result); if (amt == -1) break; result += amt; } return result != 0 ? result : -1; }