From c8d4b96a93a4b138bf04f38e92f5e9863cc11212 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 14 Aug 2019 21:31:36 -0700 Subject: dd: fix skip= with short reads. Subtract the amount we actually read, not what we asked for. --- toys/pending/dd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys') 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; } } } -- cgit v1.2.3