From a5b638ae7b57ceb6e16ce1f351c01933beb0f8d6 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Tue, 6 Jun 2017 21:04:13 +0200 Subject: [PATCH] Fix uninitialized variable bugs --- sysmodules/loader/source/loader.c | 4 +++- sysmodules/rosalina/source/menus/miscellaneous.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sysmodules/loader/source/loader.c b/sysmodules/loader/source/loader.c index 7c55259..d3b6892 100644 --- a/sysmodules/loader/source/loader.c +++ b/sysmodules/loader/source/loader.c @@ -459,12 +459,14 @@ static void handle_commands(void) } case 3: // UnregisterProgram { + prog_handle = *(u64 *)&cmdbuf[1]; + if (g_cached_prog_handle == prog_handle) { g_cached_prog_handle = 0; } cmdbuf[0] = 0x30040; - cmdbuf[1] = loader_UnregisterProgram(*(u64 *)&cmdbuf[1]); + cmdbuf[1] = loader_UnregisterProgram(prog_handle); break; } case 4: // GetProgramInfo diff --git a/sysmodules/rosalina/source/menus/miscellaneous.c b/sysmodules/rosalina/source/menus/miscellaneous.c index 840ada2..666ff31 100644 --- a/sysmodules/rosalina/source/menus/miscellaneous.c +++ b/sysmodules/rosalina/source/menus/miscellaneous.c @@ -173,7 +173,7 @@ void MiscellaneousMenu_InputRedirection(void) Result res; char buf[65]; bool wasEnabled = inputRedirectionEnabled; - bool cantStart; + bool cantStart = false; if(wasEnabled) {