From fb7a185d4db7dd0735ce5b553547b1bfda668a51 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 6 Aug 2009 12:24:51 +0200 Subject: [PATCH] Don't add empty arguments to mkvmerge's command line for options given with "add command line options". Fix for bug 429. --- src/mmg/mmg_dialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mmg/mmg_dialog.cpp b/src/mmg/mmg_dialog.cpp index f07b6b7d6..af8aa439b 100644 --- a/src/mmg/mmg_dialog.cpp +++ b/src/mmg/mmg_dialog.cpp @@ -1030,8 +1030,11 @@ mmg_dialog::update_command_line() { cli_options = strip(cli_options); if (cli_options.length() > 0) { std::vector opts = split(cli_options, wxString(wxT(" "))); - for (i = 0; i < opts.size(); i++) - clargs.Add(strip(opts[i])); + for (i = 0; i < opts.size(); i++) { + wxString opt = strip(opts[i]); + if (!opt.IsEmpty()) + clargs.Add(opt); + } } cmdline = wxT("\"") + shell_escape(options.mkvmerge, true) + wxT("\" -o \"") + shell_escape(tc_output->GetValue()) + wxT("\" ");