Skip to content

Commit

Permalink
Disallow -Ac
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrk24 committed Oct 20, 2024
1 parent 4edb6d4 commit 272e5e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static constexpr const char* FLAGS_HELP =
"\t \toperations. Incompatible with all other flags except\n"
"\t \t--null.\n"
"\t--assembly, -A \tTake the input in the pseudo-assembly format.\n"
"\t \tIncompatible with --disassemble.\n\n"
"\t \tIncompatible with --disassemble and --compile.\n\n"
"\t--expand, -e \tSpace the program out to fit the triangle.\n"
"\t \tIncompatible with all other flags except --null.\n"
"\t--null, -z \tRead the program until null terminator instead of EOF.";
Expand Down
2 changes: 1 addition & 1 deletion src/input.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct flags {
return !(
(show_stack && !debug) || ((debug || warnings || pipekill || assembly) && disassemble)
|| (hide_nops && !disassemble) || (expand && (debug || warnings || pipekill || disassemble || assembly))
|| (compile && (debug || warnings || pipekill || disassemble || expand))
|| (compile && (debug || warnings || pipekill || disassemble || expand || assembly))
|| (assume_ascii && (expand || disassemble))
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/invalid_flags/index.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ invalid_flags=(
# Not actually a flag
-
# various mode flags together
-Ae -ce -De -AD -Dc
-Ae -ce -De -AD -Dc -Ac
# --assume-ascii without actually executing
-ae -aD
# --show-stack without --debug
Expand Down

0 comments on commit 272e5e2

Please sign in to comment.