From a02478cc56778b6fb510e4160973b4ad3687c2e3 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Wed, 31 Aug 2016 08:28:46 -0700 Subject: [PATCH] Fix formatting of char literals \x00-\x0F. --- pyc_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyc_string.cpp b/pyc_string.cpp index 6c3c36c2..03910589 100644 --- a/pyc_string.cpp +++ b/pyc_string.cpp @@ -141,7 +141,7 @@ void OutputString(PycRef str, char prefix, bool triple, FILE* F) } else if (*ch == '\t') { fprintf(F, "\\t"); } else { - fprintf(F, "\\x%x", (*ch & 0xFF)); + fprintf(F, "\\x%02x", (*ch & 0xFF)); } } else if ((unsigned char)(*ch) >= 0x80) { if (str->type() == PycObject::TYPE_UNICODE) {