Skip to content

Commit b3abade

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

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/load_mid.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ static void mid_prog_to_notes(MIDTRACK *tp, ULONG adjust, ULONG tmin)
11631163
if( ton > toff ) {
11641164
char info[128];
11651165
snprintf(info,sizeof(info),"channel %d, %ld > %ld note %d", tp->chan + 1, (long)ton, (long)toff, n);
1166+
info[sizeof(info) - 1] = '\0';
11661167
mid_message("melody track ends with note on (%s)", info);
11671168
}
11681169
if( lno && lno->next ) mid_stripoff(tp, lno);

0 commit comments

Comments
 (0)