From 3e9f4fc172a9565663ce87954a70642fe34dcb76 Mon Sep 17 00:00:00 2001 From: tjr Date: Fri, 17 May 2002 05:43:00 +0000 Subject: Print signed single-byte decimal integers correctly instead of implicitly converting them to unsigned bytes. PR: 36783 --- usr.bin/hexdump/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v1.1