Skip to content

Commit d27a47b

Browse files
authored
Bugfix: ape --help should exit 0 (#1060)
1 parent 390335e commit d27a47b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ape/loader.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ __attribute__((__noreturn__)) static void ShowUsage(int os, int fd, int rc) {
876876
"NAME\n"
877877
"\n"
878878
" actually portable executable loader version " APE_VERSION_STR "\n"
879-
" copyright 2023 justine alexandra roberts tunney\n"
879+
" copyrights 2024 justine alexandra roberts tunney\n"
880880
" https://justine.lol/ape.html\n"
881881
"\n"
882882
"USAGE\n"
@@ -979,7 +979,8 @@ EXTERN_C __attribute__((__noreturn__)) void ApeLoader(long di, long *sp,
979979
ShowUsage(os, 2, 1);
980980
} else {
981981
if (argv[1][0] == '-') {
982-
rc = !(argv[1][1] == 'h' && !argv[1][2]) || !StrCmp(argv[1] + 1, "-help");
982+
rc = !((argv[1][1] == 'h' && !argv[1][2]) ||
983+
!StrCmp(argv[1] + 1, "-help"));
983984
ShowUsage(os, 1 + rc, rc);
984985
}
985986
prog = (char *)sp[2];

0 commit comments

Comments
 (0)