]> git.alsa-project.org Git - alsa-utils.git/commit
alsamixer: fix division by zero
authorClemens Ladisch <clemens@ladisch.de>
Fri, 19 Feb 2010 16:07:20 +0000 (17:07 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 12 Sep 2012 13:45:59 +0000 (15:45 +0200)
commit1bf724ea10eeb44441bba84ed468083b6a22bfe0
treecfcbe51a01d4c21e66dc132d278770db168803f7
parent7506f7fcbc0b069142f3ab9d93e75ae6e9c0d6ab
alsamixer: fix division by zero

The attempt to divide by max-min fails if a control has only one valid
value.  In this case, adjust the maximum so that the computation can
succeed; the control will look like 0%.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
alsamixer/mixer_display.c