mirror of
https://github.com/sshlien/abcmidi.git
synced 2025-12-06 06:55:06 +00:00
2021.05.19
This commit is contained in:
14
doc/CHANGES
14
doc/CHANGES
@@ -14204,3 +14204,17 @@ argument is not a power of 2. Fix: changed the return
|
||||
to -1. The program does not crash but the midi file
|
||||
is not created correctly.
|
||||
|
||||
|
||||
|
||||
May 10 2020
|
||||
|
||||
abc2midi: the following file causes abc2midi to hang.
|
||||
|
||||
X:1
|
||||
T: Hangs abc2midi
|
||||
L:1/4
|
||||
K:C
|
||||
2c/2fac'/c'/c'/c'/c'///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
James Allwright intoduced a fix in readlen() in parseabc.c
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
abcMIDI : abc <-> MIDI conversion utilities
|
||||
|
||||
midi2abc version 3.47 November 01 2020
|
||||
abc2midi version 4.54 May 10 2021
|
||||
abc2midi version 4.55 May 19 2021
|
||||
abc2abc version 2.13 May 08 2021
|
||||
yaps version 1.86 December 10 2020
|
||||
abcmatch version 1.78 March 27 2021
|
||||
|
||||
32
parseabc.c
32
parseabc.c
@@ -543,37 +543,37 @@ void readsig (char **sig, timesig_details_t *timesig)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
readlen (a, b, p)
|
||||
int *a, *b;
|
||||
char **p;
|
||||
|
||||
void readlen (int *a, int *b, char **p)
|
||||
/* read length part of a note and advance character pointer */
|
||||
{
|
||||
int t;
|
||||
|
||||
*a = readnump (p);
|
||||
if (*a == 0)
|
||||
{
|
||||
if (*a == 0) {
|
||||
*a = 1;
|
||||
};
|
||||
}
|
||||
*b = 1;
|
||||
if (**p == '/')
|
||||
{
|
||||
if (**p == '/') {
|
||||
*p = *p + 1;
|
||||
*b = readnump (p);
|
||||
if (*b == 0)
|
||||
{
|
||||
if (*b == 0) {
|
||||
*b = 2;
|
||||
while (**p == '/')
|
||||
{
|
||||
/* [JA] 2021-05-19 prevent infinite loop */
|
||||
/* limit the number of '/'s we support */
|
||||
while ((**p == '/') && (*b < 1024)) {
|
||||
*b = *b * 2;
|
||||
*p = *p + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
if (*b >= 1024) {
|
||||
event_warning ("Exceeded maximum note denominator");
|
||||
}
|
||||
}
|
||||
}
|
||||
*b = check_power_of_two(*b);
|
||||
}
|
||||
|
||||
|
||||
/* [JA] 2020-12-10 */
|
||||
static void read_L_unitlen(int *num, int *denom, char **place)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user