diff options
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 71dfc83a2..0c5d76290 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1222,12 +1222,10 @@ public: char *data = writebuffer.get(); auto size = writebuffer.size(); - while (written <= size) { + while (written < size) { auto written_this_time = wrapped->InternalWrite(data + written, size - written); if (written_this_time < 0) return false; - if (written_this_time == 0) - break; written += written_this_time; } |