diff options
author | Roland McGrath <roland@redhat.com> | 2007-10-01 18:50:35 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2007-10-01 18:50:35 +0000 |
commit | ac0a16c1d47f8d47fd9db876cf99303ba05f7409 (patch) | |
tree | 566915510c1f8fb01331e3d603f05bc881ff7313 /src | |
parent | 241ac029bb22a0bb88171085be19d6952fabdd5a (diff) | |
download | elfutils-ac0a16c1d47f8d47fd9db876cf99303ba05f7409.tar.gz |
2007-10-01 Roland McGrath <roland@redhat.com>
* readelf.c (hex_dump): Fix transposed subtraction generating spaces.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 2 | ||||
-rw-r--r-- | src/readelf.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c8267dda..832c5b99 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2007-10-01 Roland McGrath <roland@redhat.com> + * readelf.c (hex_dump): Fix transposed subtraction generating spaces. + * readelf.c (hex_dump): Fix line header to be hex instead of decimal. 2007-09-10 Roland McGrath <roland@redhat.com> diff --git a/src/readelf.c b/src/readelf.c index 2d2e43c5..823cf2b9 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -5694,7 +5694,7 @@ hex_dump (const uint8_t *data, size_t len) printf ("%02x", data[pos + i]); if (chunk < 16) - printf ("%*s", (int) ((chunk - 16) * 2 + (chunk - 16) / 4), ""); + printf ("%*s", (int) ((16 - chunk) * 2 + (16 - chunk) / 4), ""); for (size_t i = 0; i < chunk; ++i) { |