Bugfix: ape --help should exit 0

This commit is contained in:
Jōshin 2024-01-06 02:13:57 +00:00
parent c60b150fcf
commit 8c026fdc81
No known key found for this signature in database

View file

@ -978,7 +978,8 @@ EXTERN_C __attribute__((__noreturn__)) void ApeLoader(long di, long *sp,
ShowUsage(os, 2, 1);
} else {
if (argv[1][0] == '-') {
rc = !(argv[1][1] == 'h' && !argv[1][2]) || !StrCmp(argv[1] + 1, "-help");
rc = !((argv[1][1] == 'h' && !argv[1][2]) ||
!StrCmp(argv[1] + 1, "-help"));
ShowUsage(os, 1 + rc, rc);
}
prog = (char *)sp[2];