Set flags correctly

This commit is contained in:
Jōshin 2024-05-06 16:39:28 -07:00
parent d259b4aba2
commit 7aef5c786a
No known key found for this signature in database

View file

@ -1001,7 +1001,7 @@ EXTERN_C __attribute__((__noreturn__)) void ApeLoader(long di, long *sp,
os = NETBSD;
} else if (ap[0] == AT_FLAGS) {
// TODO(mrdomino): does anyone use auxv 8 for anything else?
flags = ap + 1;
flags = ap;
arg0 = !!(ap[1] & AT_FLAGS_PRESERVE_ARGV0);
}
}