From: Takashi Iwai Date: Mon, 22 Jul 2024 15:22:20 +0000 (+0200) Subject: aplaymidi: Allow to pass 0 to -u option, too X-Git-Tag: v1.2.13~33 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=d26b66f881e372f17499f8b15f1856e393dda9ee;p=alsa-utils.git aplaymidi: Allow to pass 0 to -u option, too Specifying -u 0 shouldn't be treated as an error but it should mean the legacy MIDI 1.0 handling. Signed-off-by: Takashi Iwai --- diff --git a/seq/aplaymidi/aplaymidi.c b/seq/aplaymidi/aplaymidi.c index dd8d079..7aeea82 100644 --- a/seq/aplaymidi/aplaymidi.c +++ b/seq/aplaymidi/aplaymidi.c @@ -996,11 +996,9 @@ int main(int argc, char *argv[]) end_delay = atoi(optarg); break; case 'u': - if (strcmp(optarg, "1")) { - errormsg("Only MIDI 1.0 is supported"); - return 1; - } - ump_mode = 1; + ump_mode = atoi(optarg); + if (ump_mode < 0 || ump_mode > 1) + fatal("Only MIDI 1.0 is supported"); break; default: usage(argv[0]);