We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f19579b commit e77cdaeCopy full SHA for e77cdae
Objects/unicodeobject.c
@@ -6903,8 +6903,6 @@ unicode_encode_ucs1(PyObject *unicode,
6903
str = _PyBytesWriter_WriteBytes(&writer, str,
6904
PyBytes_AS_STRING(rep),
6905
PyBytes_GET_SIZE(rep));
6906
- if (str == NULL)
6907
- goto onError;
6908
}
6909
else {
6910
assert(PyUnicode_Check(rep));
@@ -6940,6 +6938,9 @@ unicode_encode_ucs1(PyObject *unicode,
6940
6938
6941
6939
6942
+ if (str == NULL)
+ goto onError;
6943
+
6944
pos = newpos;
6945
Py_CLEAR(rep);
6946
0 commit comments