aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Holberton <tay10r@protonmail.com>2019-04-11 19:23:36 -0400
committerGitHub <noreply@github.com>2019-04-11 19:23:36 -0400
commit8752514eaf1e530e9fa8db4dda51ce80b775f001 (patch)
tree96e947d4f5885949a32632c6936a41f909a25f75 /src
parent52c1bf5fbdc4c9a47825a1da5e5b7340f35cef66 (diff)
parent9962e710f7d79afbfb956b03b064dd2fc7b1783f (diff)
Merge pull request #129 from DanielaBistrean/master
Fix integer division issue in int_to_percent function
Diffstat (limited to 'src')
-rw-r--r--src/mixer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mixer.c b/src/mixer.c
index 742c231..e496e18 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -552,7 +552,7 @@ static int int_to_percent(const struct snd_ctl_elem_info *ei, int value)
if (range == 0)
return 0;
- return ((value - ei->value.integer.min) / range) * 100;
+ return ((value - ei->value.integer.min) * 100) / range;
}
/** Gets a percentage representation of a specified control value.