summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-10-06 05:08:26 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-10-06 05:08:26 (GMT)
commit504de6bd2c3a0b717e1192eac2435808ab971c5a (patch)
tree31e03bdb5772e80173d4398058ad970b4f792664 /Objects/unicodeobject.c
parentdbe3d280e70c8a2a5542839a118333d645192b79 (diff)
downloadcpython-504de6bd2c3a0b717e1192eac2435808ab971c5a.zip
cpython-504de6bd2c3a0b717e1192eac2435808ab971c5a.tar.gz
cpython-504de6bd2c3a0b717e1192eac2435808ab971c5a.tar.bz2
Fix for SF bug [ 817156 ] invalid \U escape gives 0=length unistr.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 83104d8..f0480fb 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -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;