aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-02-28 23:10:03 -0600
committerRob Landley <rob@landley.net>2014-02-28 23:10:03 -0600
commit4dd800cb577c45b601fdf2bdaf1b471ea938f20b (patch)
tree89208c354b47898ff0a74d1b966665e49b4ee10c /lib
parentda60b9b163a598ae97d7566f095d5d69f53a6dab (diff)
downloadtoybox-4dd800cb577c45b601fdf2bdaf1b471ea938f20b.tar.gz
Fix another bug reported by Ashwini Sharma.
Diffstat (limited to 'lib')
-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;
}