Skip to content

Commit 19a5370

Browse files
committed
Revise MIDI debug message fix to still use sprintf instead of snprintf.
1 parent 2ff82c3 commit 19a5370

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/load_mid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ static void mid_notes_to_percussion(MIDTRACK *tp, ULONG adjust, ULONG tmin)
11071107
}
11081108
}
11091109
if( ton > toff ) {
1110-
char info[32];
1110+
char info[64];
11111111
sprintf(info,"%ld > %ld note %d", (long)ton, (long)toff, n);
11121112
mid_message("drum track ends with note on (%s)", info);
11131113
}
@@ -1162,7 +1162,7 @@ static void mid_prog_to_notes(MIDTRACK *tp, ULONG adjust, ULONG tmin)
11621162
}
11631163
if( ton > toff ) {
11641164
char info[128];
1165-
snprintf(info,sizeof(info),"channel %d, %ld > %ld note %d", tp->chan + 1, (long)ton, (long)toff, n);
1165+
sprintf(info,"channel %d, %ld > %ld note %d", tp->chan + 1, (long)ton, (long)toff, n);
11661166
mid_message("melody track ends with note on (%s)", info);
11671167
}
11681168
if( lno && lno->next ) mid_stripoff(tp, lno);

0 commit comments

Comments
 (0)