src/ast_render.cpp: fix rendering of character literals <= 0x0f

This commit is contained in:
Nick Erdmann
2019-06-02 17:27:09 +02:00
committed by Andrew Kelley
parent 291aaee977
commit d83b15febf

View File

@@ -352,7 +352,7 @@ static void string_literal_escape(Buf *source, Buf *dest) {
} else if (is_printable(c)) {
buf_append_char(dest, c);
} else {
buf_appendf(dest, "\\x%x", (int)c);
buf_appendf(dest, "\\x%02x", (int)c);
}
}
}