14 lines
645 B
Diff
14 lines
645 B
Diff
diff --git src/wildmidi.c src/wildmidi.c
|
|
index a9ae0f1..fd9c5e7 100644
|
|
--- a/src/wildmidi.c
|
|
+++ b/src/wildmidi.c
|
|
@@ -1997,7 +1997,7 @@ int main(int argc, char **argv) {
|
|
WildMidi_ClearError();
|
|
} else {
|
|
char *real_file = FIND_LAST_DIRSEP(argv[optind-1]);
|
|
- if (!real_file) real_file = argv[optind];
|
|
+ if (!real_file) real_file = argv[optind-1];
|
|
else real_file++;
|
|
mk_midifile_name(real_file);
|
|
printf("\rWriting %s: %u bytes.\r\n", midi_file, getmidisize);
|