]> mj.ucw.cz Git - home-hw.git/commitdiff
Utilities: debug_printf knows how to format %c
authorMartin Mares <mj@ucw.cz>
Thu, 18 Jul 2019 22:13:55 +0000 (00:13 +0200)
committerMartin Mares <mj@ucw.cz>
Thu, 18 Jul 2019 22:13:55 +0000 (00:13 +0200)
lib/util-debug.c

index b61ace51e670b7ada29e342dead9a226f38cccb8..72a566eae40f49226514c9edf53cb5b7fba8dc93 100644 (file)
@@ -167,6 +167,9 @@ void debug_printf(const char *fmt, ...)
 
                c = *fmt++;
                switch (c) {
+                       case 'c':
+                               debug_putc(va_arg(args, int));
+                               break;
                        case 'd':
                                printf_number(va_arg(args, int), width, flags | PF_SIGNED, 10);
                                break;