Skip to content

Commit bc4a63e

Browse files
committed
Allow much greater numbers of ADEVICE's within the configuration file
1 parent 4ecaf47 commit bc4a63e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

config.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -993,9 +993,8 @@ void config_init (char *fname, struct audio_s *p_audio_config,
993993

994994
if (strncasecmp(t, "ADEVICE", 7) == 0) {
995995
adevice = 0;
996-
if (isdigit(t[7])) {
997-
adevice = t[7] - '0';
998-
}
996+
if (strnlen(t, 9) >= 8)
997+
adevice = atoi(t+7);
999998

1000999
if (adevice < 0 || adevice >= MAX_ADEVS) {
10011000
text_color_set(DW_COLOR_ERROR);

0 commit comments

Comments
 (0)