aboutsummaryrefslogtreecommitdiff
path: root/source/nds
diff options
context:
space:
mode:
Diffstat (limited to 'source/nds')
-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];