From 6ee4dd48d978fb89ea60020608462014f1d0c60d Mon Sep 17 00:00:00 2001 From: arcanum Date: Thu, 3 Apr 2003 16:46:47 +0000 Subject: [PATCH] * confwin.c: Fix bug that allows garbage for non-existent user config filename on Windows. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@303 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 4 ++++ confwin.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index e85d135e..ba5f8753 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-04-03 Eric B. Weddington + * confwin.c: Fix bug that allows garbage for non-existent user + config filename on Windows. + 2003-03-24 Theodore A. Roth * NEWS: Add note about avr910 support. diff --git a/confwin.c b/confwin.c index dfcf37b9..59ae3b1f 100644 --- a/confwin.c +++ b/confwin.c @@ -30,6 +30,8 @@ static char *filename; void win_sys_config_set(char sys_config[PATH_MAX]) { + sys_config[0] = 0; + /* Use Windows API call to search for the Windows default system config file.*/ SearchPath(NULL, "avrdude.conf", NULL, PATH_MAX, sys_config, &filename); return; @@ -38,6 +40,8 @@ void win_sys_config_set(char sys_config[PATH_MAX]) void win_usr_config_set(char usr_config[PATH_MAX]) { + usr_config[0] = 0; + /* Use Windows API call to search for the Windows default user config file. */ SearchPath(NULL, "avrdude.rc", NULL, PATH_MAX, usr_config, &filename); return;