Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f14709

Browse files
committed
Recorded merge of revisions 83444 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r83444 | georg.brandl | 2010-08-01 22:51:02 +0200 (So, 01 Aug 2010) | 1 line Revert r83395, it introduces test failures and is not necessary anyway since we now have to nul-terminate the string anyway. ........
1 parent 1e2abe7 commit 0f14709

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/unicodeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3597,7 +3597,7 @@ PyObject *PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s,
35973597

35983598
ch2 = *s++;
35993599
size--;
3600-
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
3600+
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
36013601
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
36023602
*p++ = '\\';
36033603
*p++ = 'U';
@@ -3839,7 +3839,7 @@ PyObject *PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s,
38393839

38403840
ch2 = *s++;
38413841
size--;
3842-
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
3842+
if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
38433843
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
38443844
*p++ = '\\';
38453845
*p++ = 'U';

0 commit comments

Comments
 (0)