Fixes loop variables to be the same types as their limit (GH-120958)
This commit is contained in:
@@ -8373,7 +8373,7 @@ PyUnicode_BuildEncodingMap(PyObject* string)
|
||||
int count2 = 0, count3 = 0;
|
||||
int kind;
|
||||
const void *data;
|
||||
Py_ssize_t length;
|
||||
int length;
|
||||
Py_UCS4 ch;
|
||||
|
||||
if (!PyUnicode_Check(string) || !PyUnicode_GET_LENGTH(string)) {
|
||||
@@ -8382,8 +8382,7 @@ PyUnicode_BuildEncodingMap(PyObject* string)
|
||||
}
|
||||
kind = PyUnicode_KIND(string);
|
||||
data = PyUnicode_DATA(string);
|
||||
length = PyUnicode_GET_LENGTH(string);
|
||||
length = Py_MIN(length, 256);
|
||||
length = (int)Py_MIN(PyUnicode_GET_LENGTH(string), 256);
|
||||
memset(level1, 0xFF, sizeof level1);
|
||||
memset(level2, 0xFF, sizeof level2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user