diff options
author | Elliott Hughes <enh@google.com> | 2019-08-14 21:31:36 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-08-15 05:41:27 -0500 |
commit | c8d4b96a93a4b138bf04f38e92f5e9863cc11212 (patch) | |
tree | 0c1c0ef4622869e0563396480a4b04d285516e5b /toys/pending | |
parent | 7be8f6224ecc25eecb2bafd17b64dd84a1088492 (diff) | |
download | toybox-c8d4b96a93a4b138bf04f38e92f5e9863cc11212.tar.gz |
dd: fix skip= with short reads.
Subtract the amount we actually read, not what we asked for.
Diffstat (limited to 'toys/pending')
-rw-r--r-- | toys/pending/dd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/dd.c b/toys/pending/dd.c index 80a7595f..5b624fd7 100644 --- a/toys/pending/dd.c +++ b/toys/pending/dd.c @@ -212,7 +212,7 @@ void dd_main() xprintf("%s: Can't skip\n", TT.in.name); return; } - off -= chunk; + off -= n; } } } |