aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-08-14 21:31:36 -0700
committerRob Landley <rob@landley.net>2019-08-15 05:41:27 -0500
commitc8d4b96a93a4b138bf04f38e92f5e9863cc11212 (patch)
tree0c1c0ef4622869e0563396480a4b04d285516e5b /toys
parent7be8f6224ecc25eecb2bafd17b64dd84a1088492 (diff)
downloadtoybox-c8d4b96a93a4b138bf04f38e92f5e9863cc11212.tar.gz
dd: fix skip= with short reads.
Subtract the amount we actually read, not what we asked for.
Diffstat (limited to 'toys')
-rw-r--r--toys/pending/dd.c2
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;
}
}
}