Skip to content

Commit a6acbe6

Browse files
Matiissankith26
andauthored
Update src_c/color.c
Co-authored-by: Ankith <[email protected]>
1 parent e0bf78a commit a6acbe6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src_c/color.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,7 @@ _color_float(pgColorObject *color)
17641764
static PyObject *
17651765
_color_bytes(pgColorObject *color)
17661766
{
1767-
return PyBytes_FromFormat("%c%c%c%c", color->data[0], color->data[1],
1768-
color->data[2], color->data[3]);
1767+
return PyBytes_FromStringAndSize((char *)color->data, 4);
17691768
}
17701769

17711770
/* Sequence protocol methods */

0 commit comments

Comments
 (0)