Skip to content

Commit

Permalink
fix gain calculation integer length
Browse files Browse the repository at this point in the history
  • Loading branch information
Kethen committed Aug 19, 2024
1 parent bd643d1 commit c75c394
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion force_feedback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c75c394

Please sign in to comment.