From 3c359992460a31f60656b0d84de4558af0b7e4c5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 22 Jul 2021 22:08:55 +0530 Subject: [PATCH] Fix code scanning warning --- kitty/graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/graphics.c b/kitty/graphics.c index a1a9c70c8..13ea95119 100644 --- a/kitty/graphics.c +++ b/kitty/graphics.c @@ -1361,7 +1361,7 @@ handle_compose_command(GraphicsManager *self, bool *is_dirty, const GraphicsComm }; compose_rectangles(d, dest_data.buf, src_data.buf); const ImageAndFrame key = { .image_id = img->internal_id, .frame_id = dest_frame->id }; - if (!add_to_cache(self, key, dest_data.buf, (dest_data.is_opaque ? 3 : 4) * img->width * img->height)) { + if (!add_to_cache(self, key, dest_data.buf, ((size_t)(dest_data.is_opaque ? 3 : 4)) * img->width * img->height)) { if (PyErr_Occurred()) PyErr_Print(); set_command_failed_response("ENOSPC", "Failed to store image data in disk cache"); }