summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-10-04 11:51:44 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-10-04 11:51:44 (GMT)
commitfb7c38040e6ac57ec71e0fec634ce2f30de84c7f (patch)
tree902ffa6a794be9f6bc046f76c91bb2744f20ab7a
parentd524922bdc2b8db02df70ff10ccac0285dfa2014 (diff)
downloadcpython-fb7c38040e6ac57ec71e0fec634ce2f30de84c7f.zip
cpython-fb7c38040e6ac57ec71e0fec634ce2f30de84c7f.tar.gz
cpython-fb7c38040e6ac57ec71e0fec634ce2f30de84c7f.tar.bz2
Fixed compilation error introduced in 3f7519f633ed (issue #22518).
-rw-r--r--Python/codecs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/codecs.c b/Python/codecs.c
index 8b8c037..a901d6d 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -569,8 +569,7 @@ PyObject *PyCodec_XMLCharRefReplaceErrors(PyObject *exc)
if (end - start > PY_SSIZE_T_MAX / (2+7+1)) {
end = start + PY_SSIZE_T_MAX / (2+7+1);
#ifndef Py_UNICODE_WIDE
- ch = startp[end - 1];
- if (0xD800 <= ch && ch <= 0xDBFF)
+ if (0xD800 <= startp[end - 1] && startp[end - 1] <= 0xDBFF)
end--;
#endif
}