wildmidi: fix midi_file patch

This commit is contained in:
Jürgen Buchmüller 2020-01-23 18:23:15 +01:00
parent 21f4412355
commit bf65f720e5
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,6 @@
--- src/wildmidi.c 2018-11-24 09:55:50.000000000 +0100
+++ src/wildmidi.c 2020-01-23 17:07:12.497649804 +0100
@@ -1978,12 +1978,7 @@
@@ -1978,12 +1978,8 @@
if (!real_file) real_file = argv[optind];
else real_file++;
@ -10,7 +10,8 @@
- midi_file[strlen(real_file)-2] = 'i';
- midi_file[strlen(real_file)-1] = 'd';
-
+ snprintf(midi_file, sizeof(midi_file), "%s.mid", real_file);
+ snprintf(midi_file, sizeof(midi_file), "%.*s.mid",
+ (int)(strlen(real_file) - 4), real_file);
printf("\rWriting %s: %u bytes.\r\n", midi_file, getmidisize);
write_midi_output(getmidibuffer,getmidisize);
free(getmidibuffer);

View file

@ -1,7 +1,7 @@
# Template file for 'wildmidi'
pkgname=wildmidi
version=0.4.3
revision=1
revision=2
wrksrc="${pkgname}-${pkgname}-${version}"
build_style=cmake
configure_args="-DWANT_ALSA=ON -DWANT_OSS=ON"