From d5bf95ec6ef9c75e90097fe6b9ac7a2a5e26bbb0 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Thu, 21 May 2009 17:21:43 +0000 Subject: [PATCH] Initialize the string buffer to something - otherwise we'll try to load garbage --- src/gui-sdl/gui-sdl.c | 2 +- src/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui-sdl/gui-sdl.c b/src/gui-sdl/gui-sdl.c index ccb9acd..4963e77 100644 --- a/src/gui-sdl/gui-sdl.c +++ b/src/gui-sdl/gui-sdl.c @@ -570,7 +570,7 @@ void gui_display(int shortcut) if (prefs_has_changed) { - char user_options[255]; + char user_options[255] = ""; #ifdef OPTIONS_IN_HOME char *home = getenv ("HOME"); if (home != NULL && strlen (home) < 240) diff --git a/src/main.c b/src/main.c index 64ca4ff..a827d8e 100644 --- a/src/main.c +++ b/src/main.c @@ -436,7 +436,7 @@ static void parse_cmdline_and_init_file (int argc, char **argv) /* FIXME! ska: This is temporary, and will be removed when you can * pass command line options in meta.xml for the homebrew channel */ { - char user_options[255]; + char user_options[255] = ""; char *user_argv[] = {"program", "-f", user_options}; #ifdef OPTIONS_IN_HOME char *home = getenv ("HOME");