Fix uninitialized variable bugs

This commit is contained in:
TuxSH 2017-06-06 21:04:13 +02:00
parent 174089e4f3
commit a5b638ae7b
2 changed files with 4 additions and 2 deletions

View File

@ -459,12 +459,14 @@ static void handle_commands(void)
} }
case 3: // UnregisterProgram case 3: // UnregisterProgram
{ {
prog_handle = *(u64 *)&cmdbuf[1];
if (g_cached_prog_handle == prog_handle) if (g_cached_prog_handle == prog_handle)
{ {
g_cached_prog_handle = 0; g_cached_prog_handle = 0;
} }
cmdbuf[0] = 0x30040; cmdbuf[0] = 0x30040;
cmdbuf[1] = loader_UnregisterProgram(*(u64 *)&cmdbuf[1]); cmdbuf[1] = loader_UnregisterProgram(prog_handle);
break; break;
} }
case 4: // GetProgramInfo case 4: // GetProgramInfo

View File

@ -173,7 +173,7 @@ void MiscellaneousMenu_InputRedirection(void)
Result res; Result res;
char buf[65]; char buf[65];
bool wasEnabled = inputRedirectionEnabled; bool wasEnabled = inputRedirectionEnabled;
bool cantStart; bool cantStart = false;
if(wasEnabled) if(wasEnabled)
{ {