summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 3934328..673bb00 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -882,7 +882,7 @@ _PyBytes_Format(PyObject *format, PyObject *args)
if (width > len)
width--;
}
- if ((flags & F_ALT) && (c == 'x' || c == 'X')) {
+ if ((flags & F_ALT) && (c == 'o' || c == 'x' || c == 'X')) {
assert(pbuf[0] == '0');
assert(pbuf[1] == c);
if (fill != ' ') {
@@ -904,8 +904,7 @@ _PyBytes_Format(PyObject *format, PyObject *args)
if (fill == ' ') {
if (sign)
*res++ = sign;
- if ((flags & F_ALT) &&
- (c == 'x' || c == 'X')) {
+ if ((flags & F_ALT) && (c == 'o' || c == 'x' || c == 'X')) {
assert(pbuf[0] == '0');
assert(pbuf[1] == c);
*res++ = *pbuf++;