Skip to content

Commit 507f296

Browse files
committed
Fixed signed/unsigned comparison warning
1 parent 98771df commit 507f296

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
@@ -9484,7 +9484,7 @@ case_operation(PyObject *self,
94849484
kind = PyUnicode_KIND(self);
94859485
data = PyUnicode_DATA(self);
94869486
length = PyUnicode_GET_LENGTH(self);
9487-
if (length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
9487+
if ((size_t) length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
94889488
PyErr_SetString(PyExc_OverflowError, "string is too long");
94899489
return NULL;
94909490
}

0 commit comments

Comments
 (0)