changeset: 92796:d1be1f355f59 branch: 2.7 parent: 92790:3f7519f633ed user: Serhiy Storchaka date: Sat Oct 04 14:51:44 2014 +0300 files: Python/codecs.c description: Fixed compilation error introduced in 3f7519f633ed (issue #22518). diff -r 3f7519f633ed -r d1be1f355f59 Python/codecs.c --- a/Python/codecs.c Sat Oct 04 14:14:41 2014 +0300 +++ b/Python/codecs.c Sat Oct 04 14:51:44 2014 +0300 @@ -569,8 +569,7 @@ 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 }