Commit a018daa7 authored by Ilya Prokhorov's avatar Ilya Prokhorov

Do not overlap drive

parent ea3f3433
......@@ -40,6 +40,11 @@ int main(int argc, char **argv) {
for (long long int position = 0; position < length; position += blockSize) {
auto nextPosition = position + blockSize;
if (nextPosition > length) {
blockSize -= nextPosition - length;
}
auto start = std::chrono::steady_clock::now();
if (!inputStream.read(buffer, blockSize)) {
cerr << "Error: " << strerror(errno) << endl;
......
Markdown is supported
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