diff options
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 91f65f9..20de5cc 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -489,6 +489,10 @@ PyObject *PyBytes_DecodeEscape(const char *s, errors); goto failed; } + /* skip \x */ + if (s < end && Py_ISXDIGIT(s[0])) + s++; /* and a hexdigit */ + break; default: *p++ = '\\'; s--; |