summaryrefslogtreecommitdiff
path: root/coreutils/dd.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-07-29 14:59:06 +0000
committerDenis Vlasenko2007-07-29 14:59:06 +0000
commit2b03e5ef31c27b775739f4db7179d40de26f15c4 (patch)
tree973177132fb9d15e2b4b8b7deeb74914b3cb8c1e /coreutils/dd.c
parent6b74b0241cd22d4bdef1ef1860c19565fdbc4e9c (diff)
downloadbusybox-2b03e5ef31c27b775739f4db7179d40de26f15c4.zip
busybox-2b03e5ef31c27b775739f4db7179d40de26f15c4.tar.gz
dd: fix newly introduced bug (introduced by me)
Diffstat (limited to 'coreutils/dd.c')
-rw-r--r--coreutils/dd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 7247f55..b7979d6 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);