From 08bb4afb528e91b46ae8eb13277ad51cf8d724ba Mon Sep 17 00:00:00 2001 From: mischief Date: Sat, 1 Feb 2014 12:14:30 -0800 Subject: acid: use correct print flags and casts for shorts in fmt --- sys/src/cmd/acid/builtin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/src/cmd/acid/builtin.c b/sys/src/cmd/acid/builtin.c index 039c6528d..0ebc11bbf 100644 --- a/sys/src/cmd/acid/builtin.c +++ b/sys/src/cmd/acid/builtin.c @@ -1009,10 +1009,10 @@ patom(char type, Store *res) Bprint(bout, "%d", (int)res->ival); break; case 'd': - Bprint(bout, "%d", (ushort)res->ival); + Bprint(bout, "%hd", (short)res->ival); break; case 'u': - Bprint(bout, "%d", (int)res->ival&0xffff); + Bprint(bout, "%hud", (ushort)res->ival); break; case 'U': Bprint(bout, "%lud", (ulong)res->ival); -- cgit v1.2.3