This commit is contained in:
Eelco Dolstra 2018-03-22 13:20:55 +01:00
parent f87e286e82
commit dce8af59a6
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -44,7 +44,7 @@ static void dumpContents(const Path & path, size_t size,
size_t left = size;
while (left > 0) {
size_t n = left > buf.size() ? buf.size() : left;
auto n = std::min(left, buf.size());
readFull(fd.get(), buf.data(), n);
left -= n;
sink(buf.data(), n);