writef: add %c format specifier support

This commit is contained in:
josh committed 2023-06-08 13:21:24 -04:00
1 parent 8de86dd647
commit 22463e729b
1 file changed
+9 -1
+9 -1
View File
@@ -26,7 +26,15 @@ size_t writef(string s, va_list args, ch_out_fn ch_out)
{ {
if (escape) 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; ulong v;
va_arg(args, v); va_arg(args, v);