diff options
author | tjr <tjr@FreeBSD.org> | 2002-05-17 05:43:00 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-05-17 05:43:00 +0000 |
commit | 3e9f4fc172a9565663ce87954a70642fe34dcb76 (patch) | |
tree | 39537a8eb08e8b798b9202d4a054d8af5c3d1244 /usr.bin/hexdump | |
parent | 04cbf1cb054a967dfe21391011158bcefbf5a4b0 (diff) | |
download | FreeBSD-src-3e9f4fc172a9565663ce87954a70642fe34dcb76.zip FreeBSD-src-3e9f4fc172a9565663ce87954a70642fe34dcb76.tar.gz |
Print signed single-byte decimal integers correctly instead of implicitly
converting them to unsigned bytes.
PR: 36783
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 4a1a0e0..fdfb174 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)); |