summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-03 09:58:39 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-03 09:58:39 +0200
commit4d1e5686194d5c6671e3023b5e55a4043d6e1824 (patch)
treedee8d7a9fe2f0dc1a058134953cb1ef6de123b78 /src/modules
parent47d811224dc70ab2f04b3714cbc36ae3f3650b0a (diff)
downloadpulseaudio-4d1e5686194d5c6671e3023b5e55a4043d6e1824.tar.gz
alsa-util: fix check for digit
Fix the check for a digit by checking if the value is between the *character* '0' (not *value* 0) and '9'.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/alsa/alsa-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index d86f43c10..02e6ff1c3 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -1752,7 +1752,7 @@ snd_mixer_t *pa_alsa_open_mixer_by_name(pa_hashmap *mixers, const char *dev, boo
if (!pm && pa_strneq(dev, "hw:", 3)) {
const char *s = dev + 3;
int card_index;
- while (*s && *s >= 0 && *s <= '9') s++;
+ while (*s && *s >= '0' && *s <= '9') s++;
if (*s == '\0' && pa_atoi(dev + 3, &card_index) >= 0) {
PA_HASHMAP_FOREACH_KV(dev2, pm, mixers, state) {
if (pm->card_index == card_index) {