mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Merge pull request #3918 from cgohlke/patch-3
Use ssize_t to store number of elements in buffer
This commit is contained in:
commit
2aaacc8849
|
@ -133,8 +133,8 @@ PyPath_Flatten(PyObject* data, double **pxy)
|
|||
/* Assume the buffer contains floats */
|
||||
Py_buffer buffer;
|
||||
if (PyImaging_GetBuffer(data, &buffer) == 0) {
|
||||
int n = buffer.len / (2 * sizeof(float));
|
||||
float *ptr = (float*) buffer.buf;
|
||||
n = buffer.len / (2 * sizeof(float));
|
||||
xy = alloc_array(n);
|
||||
if (!xy)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user