From 8f9c1305e494ce11fdddbd111d2a4f7807e20206 Mon Sep 17 00:00:00 2001 From: Aurora Wright Date: Fri, 11 Aug 2017 23:48:32 +0200 Subject: [PATCH] Reinstate unsupported loader error --- source/main.c | 3 ++- source/start.s | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/main.c b/source/main.c index 376404b..1dbf6a5 100644 --- a/source/main.c +++ b/source/main.c @@ -70,12 +70,13 @@ void main(int argc, char **argv, u32 magicWord) isFirmlaunch = true; } - else + else if(magicWord == 0xB002) { static const char argv[] = "firm0:"; for(u32 i = 0; i < sizeof(argv); i++) //Copy and convert the path to UTF-16 launchedPath[i] = argv[i]; } + else error("Launched using an unsupported loader."); if(memcmp(launchedPath, u"sdmc", 8) == 0) { diff --git a/source/start.s b/source/start.s index 2e1be5b..86a886f 100644 --- a/source/start.s +++ b/source/start.s @@ -43,7 +43,7 @@ _start: mrceq p15, 0, r5, c6, c7, 0 ldreq r4, =0x1FFFE019 cmpeq r4, r5 - ldreq r2, =0xCAFE + ldreq r2, =0xB002 mov r9, r0 mov r10, r1