Commit 507f2964 authored by Antoine Pitrou's avatar Antoine Pitrou

Fixed signed/unsigned comparison warning

parent 98771df2
...@@ -9484,7 +9484,7 @@ case_operation(PyObject *self, ...@@ -9484,7 +9484,7 @@ case_operation(PyObject *self,
kind = PyUnicode_KIND(self); kind = PyUnicode_KIND(self);
data = PyUnicode_DATA(self); data = PyUnicode_DATA(self);
length = PyUnicode_GET_LENGTH(self); length = PyUnicode_GET_LENGTH(self);
if (length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) { if ((size_t) length > PY_SSIZE_T_MAX / (3 * sizeof(Py_UCS4))) {
PyErr_SetString(PyExc_OverflowError, "string is too long"); PyErr_SetString(PyExc_OverflowError, "string is too long");
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment