Skip to content

Commit

Permalink
Make CodeQL happy
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Feb 11, 2025
1 parent 077116e commit 2281a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kitty/fonts.c
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@ render_decoration(PyObject *self UNUSED, PyObject *args) {
const char *which;
FontCellMetrics fcm = {0};
if (!PyArg_ParseTuple(args, "sIIII", &which, &fcm.cell_width, &fcm.cell_height, &fcm.underline_position, &fcm.underline_thickness)) return NULL;
PyObject *ans = PyBytes_FromStringAndSize(NULL, fcm.cell_width * fcm.cell_height);
PyObject *ans = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)fcm.cell_width * fcm.cell_height);
if (!ans) return NULL;
memset(PyBytes_AS_STRING(ans), 0, PyBytes_GET_SIZE(ans));
if (strcmp(which, "curl") == 0) add_curl_underline((uint8_t*)PyBytes_AS_STRING(ans), fcm);
Expand Down

0 comments on commit 2281a55

Please # to comment.