mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Fix for SF bug [ 817156 ] invalid \U escape gives 0=length unistr.
This commit is contained in:
parent
dbe3d280e7
commit
504de6bd2c
2 changed files with 8 additions and 1 deletions
|
@ -1750,7 +1750,7 @@ PyObject *PyUnicode_DecodeUnicodeEscape(const char *s,
|
|||
chr += 10 + c - 'A';
|
||||
}
|
||||
s += i;
|
||||
if (chr == 0xffffffff)
|
||||
if (chr == 0xffffffff && PyErr_Occurred())
|
||||
/* _decoding_error will have already written into the
|
||||
target buffer. */
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue