diff options
author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-17 05:43:00 +0000 |
---|---|---|
committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-17 05:43:00 +0000 |
commit | cf45dcc8e6021b24bbf1584358905d36fb59cd48 (patch) | |
tree | 39537a8eb08e8b798b9202d4a054d8af5c3d1244 /usr.bin/hexdump | |
parent | a43171c248a1f725315f02133475cdd8207dbc0b (diff) | |
download | src-cf45dcc8e6021b24bbf1584358905d36fb59cd48.tar.gz src-cf45dcc8e6021b24bbf1584358905d36fb59cd48.zip |
Print signed single-byte decimal integers correctly instead of implicitly
converting them to unsigned bytes.
PR: 36783
Notes
Notes:
svn path=/head/; revision=96790
Diffstat (limited to 'usr.bin/hexdump')
-rw-r--r-- | usr.bin/hexdump/display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index 4a1a0e06935e..fdfb1744a78a 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -154,7 +154,7 @@ print(pr, bp) case F_INT: switch(pr->bcnt) { case 1: - (void)printf(pr->fmt, (quad_t)*bp); + (void)printf(pr->fmt, (quad_t)(signed char)*bp); break; case 2: bcopy(bp, &s2, sizeof(s2)); |