From: Serhiy Storchaka Date: Sat, 4 Oct 2014 11:51:44 +0000 (+0300) Subject: Fixed compilation error introduced in 3f7519f633ed (issue #22518). X-Git-Tag: v2.7.9rc1~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb7c38040e6ac57ec71e0fec634ce2f30de84c7f;p=thirdparty%2FPython%2Fcpython.git Fixed compilation error introduced in 3f7519f633ed (issue #22518). --- diff --git a/Python/codecs.c b/Python/codecs.c index 8b8c037e93ca..a901d6de032f 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 }