From a63bcfbfb49b6aeaa1c6f3527f91563919e03255 Mon Sep 17 00:00:00 2001 From: Yay295 Date: Sun, 21 Aug 2022 15:27:27 -0500 Subject: [PATCH] parse tuple into "r" and "g" instead of "r" and "a" because we want to put the values in the first two bytes --- src/_imaging.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/_imaging.c b/src/_imaging.c index 0888188fb..3dcc9af5e 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -550,10 +550,9 @@ getink(PyObject *color, Imaging im, char *ink) { if (tupleSize != 1 && tupleSize != 2) { PyErr_SetString(PyExc_TypeError, "color must be int, or tuple of one or two elements"); return NULL; - } else if (!PyArg_ParseTuple(color, "L|i", &r, &a)) { + } else if (!PyArg_ParseTuple(color, "L|i", &r, &g)) { return NULL; } - g = b = r; } else { if (tupleSize != 3 && tupleSize != 4) { PyErr_SetString(PyExc_TypeError, "color must be int, or tuple of one, three or four elements");