aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 1126e11e..a8195dd4 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -109,7 +109,7 @@ off_t lskip(int fd, off_t offset)
or = readall(fd, libbuf, try);
if (or < 0) perror_exit("lskip to %lld", (long long)offset);
- else offset -= try;
+ else offset -= or;
if (or < try) break;
}