ref: f298843077df17cc7181d6abb04062a1c5388611
parent: c37faa91eaa4308b2bb6102562e4ca3bb496abd8
author: mischief <mischief@offblast.org>
date: Sat Feb 1 07:14:30 EST 2014
acid: use correct print flags and casts for shorts in fmt
--- a/sys/src/cmd/acid/builtin.c
+++ b/sys/src/cmd/acid/builtin.c
@@ -1009,10 +1009,10 @@
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);
--
⑨