From 0f594ef95047d407c7c4cd89984e851d1d70d979 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 27 Aug 2018 15:47:21 +0530 Subject: [PATCH] Ensure multiplication is not unsigned --- kitty/mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/mouse.c b/kitty/mouse.c index ecf97747a..01596b6b6 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -552,7 +552,7 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags) { } s = abs(((int)round(pixels))) / global_state.callback_os_window->fonts_data->cell_height; if (pixels < 0) s *= -1; - global_state.callback_os_window->pending_scroll_pixels = pixels - s * global_state.callback_os_window->fonts_data->cell_height; + global_state.callback_os_window->pending_scroll_pixels = pixels - s * (int) global_state.callback_os_window->fonts_data->cell_height; } else { s = (int) round(yoffset * OPT(wheel_scroll_multiplier)); global_state.callback_os_window->pending_scroll_pixels = 0;