]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(skip): Fix off-by-one error reported by Theodoros V. Kalamatianos.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Oct 2005 08:39:14 +0000 (08:39 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Oct 2005 08:39:14 +0000 (08:39 +0000)
src/dd.c

index 0c65149b5e0a3ad5f0ef023822f1f778ca6fe584..56e3a033e2e3ba1c1242959f58d478c02d8a8236 100644 (file)
--- a/src/dd.c
+++ b/src/dd.c
@@ -1167,7 +1167,7 @@ skip (int fdesc, char const *file, uintmax_t records, size_t blocksize,
          if (fdesc == STDIN_FILENO)
            advance_input_offset (nread);
        }
-      while (records-- != 0);
+      while (--records != 0);
 
       return records;
     }