Skip to content

Commit bc4a52d

Browse files
committed
Issue #29044: Merge 3.5.
2 parents d1f16fa + d04fa29 commit bc4a52d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Objects/unicodeobject.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14324,11 +14324,12 @@ formatchar(PyObject *v)
1432414324
if (iobj == NULL) {
1432514325
goto onError;
1432614326
}
14327-
v = iobj;
14327+
x = PyLong_AsLong(iobj);
1432814328
Py_DECREF(iobj);
1432914329
}
14330-
/* Integer input truncated to a character */
14331-
x = PyLong_AsLong(v);
14330+
else {
14331+
x = PyLong_AsLong(v);
14332+
}
1433214333
if (x == -1 && PyErr_Occurred())
1433314334
goto onError;
1433414335

0 commit comments

Comments
 (0)