Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1b11c88d authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: ff-memless - another fix for signed to unsigned overflow



The commit 9e68177e changed 'gain' from
signed to unsigned to fix an issue with rumble effect calculation, however
it introduced problems when calculating constant effects. Having 'gain'
being unsigned int was an unfortunate choice since it dominates all
implicit type conversions causing everything to be treated as unsigned
int.

Let's change it back to signed int and simply add proper casts to rumble
effect calculations.

Reported-by: default avatarGary Stein <lordcnidarian@gmail.com>
Acked-by: default avatarAnssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 25ae0831
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment