1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 05:42:17 +00:00

Fix logic bug in stage2's main function

This commit is contained in:
TuxSH 2018-06-05 16:18:02 +02:00
parent 6b7da2887f
commit 0491a21a99

View file

@ -58,18 +58,18 @@ static void exit_callback(int rc) {
int main(int argc, void **argv) {
loader_ctx_t *loader_ctx = get_loader_ctx();
/* Initialize the display, console, FS, etc. */
setup_env();
if (argc != STAGE2_ARGC) {
fatal_error("Invalid argc (expected %d, got %d)!\n", STAGE2_ARGC, argc);
generic_panic();
}
g_stage2_args = (stage2_args_t *)argv[STAGE2_ARGV_ARGUMENT_STRUCT];
if(g_stage2_args->version != 0) {
fatal_error("Incorrect Stage2 args version (expected %lu, got %lu)!\n", 0ul, g_stage2_args->version);
generic_panic();
}
/* Initialize the display, console, FS, etc. */
setup_env();
printf(u8"Welcome to Atmosphère Fusée Stage 2!\n");
printf("Stage 2 executing from: %s\n", (const char *)argv[STAGE2_ARGV_PROGRAM_PATH]);