From c75c3943a13388371d0f4c98c18f426e26d7f987 Mon Sep 17 00:00:00 2001 From: Katharine Chui Date: Mon, 19 Aug 2024 16:09:20 +0200 Subject: [PATCH] fix gain calculation integer length --- force_feedback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/force_feedback.c b/force_feedback.c index 46d0620..a6352da 100644 --- a/force_feedback.c +++ b/force_feedback.c @@ -439,7 +439,7 @@ int lg4ff_timer(struct lg4ff_device *device) memset(parameters, 0, sizeof(parameters)); - gain = (uint16_t)device->gain * device->app_gain / 0xffff; + gain = (uint32_t)device->gain * device->app_gain / 0xffff; count = device->effects_used;