mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-17 21:54:03 +00:00
Fix size type passed to Py_BuildValue y# in load_png_data
This commit is contained in:
parent
9cfd91e812
commit
3979ce68ff
1 changed files with 1 additions and 1 deletions
|
|
@ -285,7 +285,7 @@ load_png_data(PyObject *self UNUSED, PyObject *args) {
|
|||
inflate_png_inner(&d, (const uint8_t *)data, sz, 10000);
|
||||
PyObject *ans = NULL;
|
||||
if (d.ok && !PyErr_Occurred()) {
|
||||
ans = Py_BuildValue("y#ii", d.decompressed, (int)d.sz, d.width, d.height);
|
||||
ans = Py_BuildValue("y#ii", d.decompressed, (Py_ssize_t)d.sz, d.width, d.height);
|
||||
} else {
|
||||
if (!PyErr_Occurred()) PyErr_SetString(PyExc_ValueError, "Unknown error while reading PNG data");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue