From: Denis Vlasenko Date: Sun, 29 Jul 2007 14:59:06 +0000 (-0000) Subject: dd: fix newly introduced bug (introduced by me) X-Git-Tag: 1_7_0~87 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2b03e5ef31c27b775739f4db7179d40de26f15c4;p=oweals%2Fbusybox.git dd: fix newly introduced bug (introduced by me) --- diff --git a/coreutils/dd.c b/coreutils/dd.c index 7247f55e0..b7979d62f 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -268,7 +268,7 @@ int dd_main(int argc, char **argv) goto die_outfile; } - while ((flags & FLAG_COUNT) && (G.in_full + G.in_part != count)) { + while (!(flags & FLAG_COUNT) || (G.in_full + G.in_part != count)) { if (flags & FLAG_NOERROR) /* Pre-zero the buffer if conv=noerror */ memset(ibuf, 0, ibs); n = safe_read(ifd, ibuf, ibs);