summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/actions.c20
2 files changed, 21 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0beef7a..7cb8f48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,13 @@
-2004-11-20 Shawn Betts <katia_dilkina@verizon.net>
+2004-11-22 Shawn Betts <sabetts@vcn.bc.ca>
+
+ * src/actions.c (cmd_verbexec): rewritten to fix crash bug.
+
+2004-11-20 Shawn Betts <sabetts@vcn.bc.ca>
* src/actions.c (cmd_rathold): change argument order. echo parse
errors.
-2004-11-19 Shawn Betts <katia_dilkina@verizon.net>
+2004-11-19 Shawn Betts <sabetts@vcn.bc.ca>
* src/actions.c (cmd_sfdump): properly declare i at the top of the
function.
diff --git a/src/actions.c b/src/actions.c
index 67e24d2..0cfe727 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -3875,11 +3875,21 @@ cmd_frestore (int interactively, char *data)
char *
cmd_verbexec (int interactive, char *data)
{
- char msg[100]="Running ";
- strncat(msg, data, 100-strlen(msg));
-
- if(data) cmd_echo(interactive, msg);
- return cmd_exec(interactive, data);
+ char *cmd;
+
+ if (data == NULL)
+ cmd = get_input (MESSAGE_PROMPT_SHELL_COMMAND, exec_completions);
+ else
+ cmd = xstrdup (data);
+
+ /* User aborted. */
+ if (cmd == NULL)
+ return NULL;
+
+ marked_message_printf(0, 0, " Running %s ", cmd);
+ spawn (cmd);
+ free (cmd);
+ return NULL;
}
static char *