]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
2007-10-01 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Mon, 1 Oct 2007 18:50:35 +0000 (18:50 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 1 Oct 2007 18:50:35 +0000 (18:50 +0000)
* readelf.c (hex_dump): Fix transposed subtraction generating spaces.

src/ChangeLog
src/readelf.c

index c8267ddaee0e058d2b96e124cd32215a8370f977..832c5b999ded7ccd5e320316d69b2ca911c13f44 100644 (file)
@@ -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>
index 2d2e43c5835ecf5b724c031dab5bd255b3a6b01e..823cf2b99dd9fdf4fa608510216875921f5e1e7c 100644 (file)
@@ -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)
        {