]> 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)
committerClemens Ladisch <clemens@ladisch.de>
Fri, 19 Feb 2010 16:07:20 +0000 (17:07 +0100)
commit5a016b583b5c949253a9e791ad79f13e54f87054
treecfcbe51a01d4c21e66dc132d278770db168803f7
parent69c6bead434e7a4a546ab1300413312994b93e35
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