diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-03-25 16:39:05 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1994-03-25 16:39:05 +0000 |
commit | 0c1af47ff04ab4e8269aeb108002100bc32130c1 (patch) | |
tree | 58ec95a3b202290c759a61af5edfc72ceb34dfe9 /gdb/main.c | |
parent | 11d7c0645386ce5f082f913854f85390c8d1079e (diff) | |
download | gdb-0c1af47ff04ab4e8269aeb108002100bc32130c1.zip gdb-0c1af47ff04ab4e8269aeb108002100bc32130c1.tar.gz gdb-0c1af47ff04ab4e8269aeb108002100bc32130c1.tar.bz2 |
* main.c (complete_command): Deal with it if arg is NULL.
Diffstat (limited to 'gdb/main.c')
-rw-r--r-- | gdb/main.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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; |