Skip to content

Commit

Permalink
Fix formatting of char literals \x00-\x0F.
Browse files Browse the repository at this point in the history
  • Loading branch information
zrax committed Aug 31, 2016
1 parent def5d90 commit a02478c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyc_string.cpp
Expand Up @@ -141,7 +141,7 @@ void OutputString(PycRef<PycString> 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) {
Expand Down

0 comments on commit a02478c

Please sign in to comment.