afc92c4c819b03e98ee57bc792fb6f1ca08e6e0b — Simon Ser 2 months ago 2fad00f
builtin/command: fix -v argument check
1 files changed, 1 insertions(+), 1 deletions(-)

M builtin/command.c
M builtin/command.c => builtin/command.c +1 -1
@@ 57,7 57,7 @@ int builtin_command(struct mrsh_state *state, int argc, char *argv[]) {
 	while ((opt = mrsh_getopt(argc, argv, ":vVp")) != -1) {
 		switch (opt) {
 		case 'v':
-			if (mrsh_optind < argc) {
+			if (mrsh_optind != argc - 1) {
 				fprintf(stderr, command_usage);
 				return 1;
 			}