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

Skip to content

Commit 8879a33

Browse files
committed
Fixes [ #430986 ] Buglet in PyUnicode_FromUnicode.
1 parent 2c07195 commit 8879a33

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ PyObject *PyUnicode_FromUnicode(const Py_UNICODE *u,
297297
unicode = unicode_latin1[*u];
298298
if (!unicode) {
299299
unicode = _PyUnicode_New(1);
300-
unicode->str[0] = *u;
301300
if (!unicode)
302301
return NULL;
302+
unicode->str[0] = *u;
303303
unicode_latin1[*u] = unicode;
304304
}
305305
Py_INCREF(unicode);

0 commit comments

Comments
 (0)