(dump): Correct loop-termination criterion.
authorJim Meyering <jim@meyering.net>
Fri, 7 Jul 1995 04:46:03 +0000 (04:46 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 7 Jul 1995 04:46:03 +0000 (04:46 +0000)
commit67718aff76c90766c1167612f790e7aa655ff941
tree5aad5019149a6d05e948f4feed170ce666d9377b
parentb9d3dc410149360b14936764c52b327c785296fa
(dump): Correct loop-termination criterion.
Before, running `printf 1234| ./od --width=4 --read-bytes=4'
printed output for 8 bytes -- the last four were garbage.
This happened only when the dump limit, N, was specified (with
--read-bytes=N) and N was a multiple of bytes_per_block
(usually 16, but 4 in this example).  From Andreas Schwab.
src/od.c