about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/archive.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc
index 27b1726ad046..25deccc09c15 100644
--- a/src/libutil/archive.cc
+++ b/src/libutil/archive.cc
@@ -81,7 +81,7 @@ static void dumpContents(const Path & path, unsigned int size,
     unsigned char buf[65536];
     unsigned int left = size;
 
-    while (left >= 0) {
+    while (left > 0) {
         size_t n = left > sizeof(buf) ? sizeof(buf) : left;
         readFull(fd, buf, n);
         left -= n;