continue;
soundcard_setup_merge_sw(soundcard->control.switches, rsoundcard->control.switches, soundcard->no, -1, "control");
for (rmixer = rsoundcard->mixers; rmixer; rmixer = rmixer->next) {
- for (mixer = soundcard->mixers; mixer; mixer = rmixer->next) {
+ for (mixer = soundcard->mixers; mixer; mixer = mixer->next) {
if (!strncmp(mixer->info.name, rmixer->info.name, sizeof(mixer->info.name)))
break;
}
if (cardno >= 0 && soundcard->no != cardno)
continue;
for (rmixer = rsoundcard->mixers; rmixer; rmixer = rmixer->next) {
- for (mixer = soundcard->mixers; mixer; mixer = rmixer->next) {
+ for (mixer = soundcard->mixers; mixer; mixer = mixer->next) {
if (!strncmp(mixer->info.name, rmixer->info.name, sizeof(mixer->info.name)))
break;
}
break;
case 'd':
case HELPID_DEVICE:
- device = device;
+ device = atoi(optarg);
+ if (device < 0 || device > 32) {
+ fprintf(stderr, "Error: device %i is invalid\n", device);
+ return 1;
+ }
break;
case 'q':
case HELPID_QUIET: