ui-snapshot.c: Fill argv[0] with dummy.
parse_archive_args does not pass PARSE_OPT_KEEP_ARGV0 to parse_args, which means the first argument will be discarded, as though it were a function being called from the command-line. Thus, we fill argv[0] with a dummy argument to prevent this from happening. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Este cometimento está contido em:
ascendente
bdae1d8a8d
cometimento
973deda0ea
@ -14,6 +14,7 @@
|
|||||||
static int write_archive_type(const char *format, const char *hex, const char *prefix)
|
static int write_archive_type(const char *format, const char *hex, const char *prefix)
|
||||||
{
|
{
|
||||||
struct argv_array argv = ARGV_ARRAY_INIT;
|
struct argv_array argv = ARGV_ARRAY_INIT;
|
||||||
|
argv_array_push(&argv, "snapshot");
|
||||||
argv_array_push(&argv, format);
|
argv_array_push(&argv, format);
|
||||||
if (prefix) {
|
if (prefix) {
|
||||||
argv_array_push(&argv, "--prefix");
|
argv_array_push(&argv, "--prefix");
|
||||||
|
Carregando…
Criar uma nova questão referindo esta
Bloquear um utilizador