writef: add %c format specifier support

This commit is contained in:
Josh Holtrop 2023-06-08 13:21:24 -04:00
parent 8de86dd647
commit 22463e729b

View File

@ -26,7 +26,15 @@ size_t writef(string s, va_list args, ch_out_fn ch_out)
{
if (escape)
{
if (c == 'x')
if (c == 'c')
{
ulong ch;
va_arg(args, ch);
ch_out(cast(ubyte)ch);
length_written++;
escape = false;
}
else if (c == 'x')
{
ulong v;
va_arg(args, v);