From 0c1af47ff04ab4e8269aeb108002100bc32130c1 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Fri, 25 Mar 1994 16:39:05 +0000 Subject: * main.c (complete_command): Deal with it if arg is NULL. --- gdb/ChangeLog | 4 ++++ gdb/main.c | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3bd9f03..d2ddcaf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 25 08:33:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * main.c (complete_command): Deal with it if arg is NULL. + Thu Mar 24 07:12:09 1994 Jim Kingdon (kingdon@lioth.cygnus.com) * config/mips/tm-mips.h (SETUP_ARBITRARY_FRAME): Revise comment diff --git a/gdb/main.c b/gdb/main.c index 96b6cde..38771da 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -1987,8 +1987,16 @@ complete_command (arg, from_tty) dont_repeat (); - strcpy (rl_line_buffer, arg); - rl_point = strlen (arg); + if (arg == NULL) + { + rl_line_buffer[0] = '\0'; + rl_point = 0; + } + else + { + strcpy (rl_line_buffer, arg); + rl_point = strlen (arg); + } for (completion = symbol_completion_function (rl_line_buffer, i = 0); completion; -- cgit v1.1