summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index b0d9b39..6e7c4fa 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -1207,8 +1207,9 @@ PyObject *PyBytes_DecodeEscape(const char *s,
break;
default:
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "invalid escape sequence '\\%c'", *(--s)) < 0)
+ goto failed;
*p++ = '\\';
- s--;
goto non_esc; /* an arbitrary number of unescaped
UTF-8 bytes may follow. */
}