From 90b54581b0d6096f391e39538a774be71d9e6425 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Tue, 23 May 2017 21:47:20 +0200 Subject: [PATCH] Fix two bugs --- loader/source/main.c | 11 +++++++---- source/screen.c | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/loader/source/main.c b/loader/source/main.c index 4bfda93..0799851 100644 --- a/loader/source/main.c +++ b/loader/source/main.c @@ -37,10 +37,13 @@ void main(int argc, char **argv) fbs[1] = fbsrc[1]; } - u32 i; - for(i = 0; i < sizeof(absPath) - 1 && argv[0][i] != 0; i++) - absPath[i] = argv[0][i]; - absPath[i] = 0; + if(argc >= 1) + { + u32 i; + for(i = 0; i < sizeof(absPath) - 1 && argv[0][i] != 0; i++) + absPath[i] = argv[0][i]; + absPath[i] = 0; + } char *argvPassed[2] = {absPath, (char *)&fbs}; diff --git a/source/screen.c b/source/screen.c index 5e3da56..c7e051c 100644 --- a/source/screen.c +++ b/source/screen.c @@ -44,7 +44,7 @@ static const u32 brightness[4] = {0x5F, 0x4C, 0x39, 0x26}; -static volatile Arm11Operation *operation = (volatile Arm11Operation *)0x1FFFFFF0; +static volatile Arm11Operation *operation = (volatile Arm11Operation *)0x1FF80004; struct fb fbs[2];