aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-06 02:31:55 -0500
committerNebuleon Fumika2013-02-06 02:31:55 -0500
commit9829c836089c44d5c8cc7e3d0f7007ab33b0cb1a (patch)
treef5fcfc6c0262754268737ef73f6ba193ec41f5af
parenta358ef69a85a7252ed6b5a30496c49b28b26eecd (diff)
downloadsnes9x2005-9829c836089c44d5c8cc7e3d0f7007ab33b0cb1a.tar.gz
snes9x2005-9829c836089c44d5c8cc7e3d0f7007ab33b0cb1a.tar.bz2
snes9x2005-9829c836089c44d5c8cc7e3d0f7007ab33b0cb1a.zip
Fix the loading screen for a ROM appearing for a split second after the splash screen.
Fix uninitialised memory access in Check_LoadArg.
-rw-r--r--source/nds/gui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c
index f71f70f..5d969a2 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -3550,7 +3550,7 @@ u32 menu(u16 *screen, bool8 FirstInvocation)
{
first_load = 1;
//try auto loading games passed through argv first
- if(LoadGameAndItsData(argv[1]))
+ if(strlen(argv[1]) > 0 && LoadGameAndItsData(argv[1]))
repeat = 0;
else
{
@@ -4683,6 +4683,8 @@ static bool Get_Args(char *file, char **filebuf){
}
int CheckLoad_Arg(){
+ argv[0][0] = '\0'; // Initialise the first byte to be a NULL in case
+ argv[1][0] = '\0'; // there are no arguments to avoid uninit. memory
char *argarray[2];
argarray[0] = argv[0];
argarray[1] = argv[1];