Skip to content

Commit

Permalink
Finish last commit.
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Rohloff <v10lator@myway.de>
  • Loading branch information
V10lator committed Dec 15, 2023
1 parent 53b7482 commit bab2561
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/cfw.c
Expand Up @@ -32,6 +32,8 @@
#define VALUE_A 0xE3A00000 // mov r0, #0
#define VALUE_B 0xE12FFF1E // bx lr

#define CFW_ERR "Unsupported environment.\nEither you're not using Tiramisu/Aroma or your Tiramisu version is out of date.\n\n"

static bool mochaReady = false;
static const uint32_t addys[6] = {
// Cached cert check
Expand All @@ -50,9 +52,12 @@ static char cfwError[1024] = { '\0' }; // TODO

static void printCfwError(const char *str, ...)
{
size_t l = strlen(CFW_ERR);
OSBlockMove(cfwError, CFW_ERR, l, false);

va_list va;
va_start(va, str);
vsnprintf(cfwError, 1024 - 1, str, va);
vsnprintf(cfwError + l, (1024 - 1) - l, str, va);
va_end(va);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Expand Up @@ -201,7 +201,7 @@ static void innerMain(const char *cfwError)
lerr = "Couldn't initialize Crypto!";
}
else
lerr = "Unsupported environment.\nEither you're not using Tiramisu/Aroma or your Tiramisu version is out of date."; //TODO: Add cfwError to this.
lerr = (char *)cfwError;

if(lerr != NULL)
{
Expand Down

0 comments on commit bab2561

Please sign in to comment.