diff --git a/utilities/env_librados.cc b/utilities/env_librados.cc index 7ecfd6d3e..73482ac6a 100644 --- a/utilities/env_librados.cc +++ b/utilities/env_librados.cc @@ -127,7 +127,7 @@ public: Status s; int r = _io_ctx->read(_fid, buffer, n, _offset); if (r >= 0) { - buffer.copy(0, r, scratch); + buffer.begin().copy(r, scratch); *result = Slice(scratch, r); _offset += r; s = Status::OK(); @@ -205,7 +205,7 @@ public: Status s; int r = _io_ctx->read(_fid, buffer, n, offset); if (r >= 0) { - buffer.copy(0, r, scratch); + buffer.begin().copy(r, scratch); *result = Slice(scratch, r); s = Status::OK(); } else {