Bugfix in MIDI parser.

master
Albert Graef 2018-09-01 07:42:39 +02:00
parent ab8b31c9aa
commit 2bb1113fac
1 changed files with 1 additions and 1 deletions

View File

@ -1043,7 +1043,7 @@ parse_midi(char *tok, char *s, int lhs, int mode,
char *p = tok, *t;
int n, m = -1, k = midi_channel;
s[0] = 0;
while (*p && !isdigit(*p) && !strchr("+-=<>~'[:", *p)) p++;
while (*p && !isdigit(*p) && !strchr("+-=<>~'[{:", *p)) p++;
if (p == tok || p-tok > 10) return 0; // no valid token
// the token by itself
strncpy(s, tok, p-tok); s[p-tok] = 0;