summaryrefslogtreecommitdiffstats
path: root/usr.bin/hexdump
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-05-17 05:43:00 +0000
committertjr <tjr@FreeBSD.org>2002-05-17 05:43:00 +0000
commit3e9f4fc172a9565663ce87954a70642fe34dcb76 (patch)
tree39537a8eb08e8b798b9202d4a054d8af5c3d1244 /usr.bin/hexdump
parent04cbf1cb054a967dfe21391011158bcefbf5a4b0 (diff)
downloadFreeBSD-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.c2
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));
OpenPOWER on IntegriCloud