Minor update to bprintf.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 1 Mar 2008 18:35:17 +0000 (13:35 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 1 Mar 2008 18:35:17 +0000 (13:35 -0500)
Support '%c'.
Fix bug causing junk to be printed on unrecognized % code.

src/output.c

index 043caa2..43eb128 100644 (file)
@@ -135,13 +135,16 @@ bprintf(u16 action, const char *fmt, ...)
             val = va_arg(args, s32);
             puthex(action, val);
             break;
+        case 'c':
+            val = va_arg(args, int);
+            putc(action, val);
+            break;
         case 's':
             sarg = va_arg(args, const char *);
             puts_cs(action, sarg);
             break;
         default:
             putc(action, '%');
-            putc(action, *s);
             n = s;
         }
         s = n;