Rework the MIDI_OCTAVE directive so that the octave offset can also be given in the next token.

master
Albert Graef 2018-08-12 09:01:54 +02:00
parent eccbb9ce64
commit 2b2d11ed3c
2 changed files with 5 additions and 2 deletions

View File

@ -1214,6 +1214,9 @@ read_config_file(void)
if (!strncmp(tok, "MIDI_OCTAVE", 11)) {
char *a = tok+11;
int k, n;
if (!*a)
// look for the offset in the next token
a = token(NULL, &delim);
if (sscanf(a, "%d%n", &k, &n) == 1 && !a[n]) {
midi_octave = k;
} else {