mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 12:41:08 +08:00
set: Remove a broken array read
Hardcode "--erase" as a hack, because "argv[-1]" is *not* a thing.
Introduced in aacc71e585
.
Fixed in master by no longer being C++.
This commit is contained in:
parent
be0ea9862c
commit
20d36cd9a2
|
@ -244,7 +244,7 @@ static int validate_cmd_opts(const wchar_t *cmd, const set_cmd_opts_t &opts, int
|
|||
}
|
||||
|
||||
if (argc == 0 && opts.erase) {
|
||||
streams.err.append_format(BUILTIN_ERR_MISSING, cmd, argv[-1]);
|
||||
streams.err.append_format(BUILTIN_ERR_MISSING, cmd, L"--erase");
|
||||
builtin_print_error_trailer(parser, streams.err, cmd);
|
||||
return STATUS_INVALID_ARGS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user