From bc4a63e7ab3b5d7a4d6e2019875da7c96c029e4a Mon Sep 17 00:00:00 2001 From: Jeff Deaton Date: Thu, 5 Jul 2018 22:47:35 -0600 Subject: [PATCH] Allow much greater numbers of ADEVICE's within the configuration file --- config.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config.c b/config.c index 8c367e2c..837347b5 100644 --- a/config.c +++ b/config.c @@ -993,9 +993,8 @@ void config_init (char *fname, struct audio_s *p_audio_config, if (strncasecmp(t, "ADEVICE", 7) == 0) { adevice = 0; - if (isdigit(t[7])) { - adevice = t[7] - '0'; - } + if (strnlen(t, 9) >= 8) + adevice = atoi(t+7); if (adevice < 0 || adevice >= MAX_ADEVS) { text_color_set(DW_COLOR_ERROR);