From a47eb31d2a1fde89b4cf3a3e5b549e941cb6d77e Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Wed, 24 Jul 2002 19:00:48 +0000 Subject: [PATCH] WCMD_run_program: don't try to run an empty line. --- programs/wcmd/wcmdmain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/wcmd/wcmdmain.c b/programs/wcmd/wcmdmain.c index a4b6539af89..8b6607f037c 100644 --- a/programs/wcmd/wcmdmain.c +++ b/programs/wcmd/wcmdmain.c @@ -360,6 +360,8 @@ HINSTANCE hinst; char filetorun[MAX_PATH]; WCMD_parse (command, quals, param1, param2); /* Quick way to get the filename */ + if (!(*param1) && !(*param2)) + return; if (strpbrk (param1, "\\:") == NULL) { /* No explicit path given */ if ((strchr (param1, '.') == NULL) || (strstr (param1, ".bat") != NULL)) { if (SearchPath (NULL, param1, ".bat", sizeof(filetorun), filetorun, NULL)) { @@ -659,4 +661,3 @@ char temp_path[MAX_PATH], temp_file[MAX_PATH], temp_file2[MAX_PATH], temp_cmd[10 WCMD_process_command (temp_cmd); DeleteFile (temp_file); } -