* top.c (build_command_line): Demand arguments for if/while
authorJeff Law <law@redhat.com>
Tue, 3 Oct 1995 03:48:32 +0000 (03:48 +0000)
committerJeff Law <law@redhat.com>
Tue, 3 Oct 1995 03:48:32 +0000 (03:48 +0000)
commands.

gdb/ChangeLog
gdb/top.c

index b481540664cf92da90b8a66bcefdf44bfb587084..29840d470ebd5b7251d2653f2be045e6052c5ce1 100644 (file)
@@ -1,3 +1,8 @@
+Mon Oct  2 21:45:44 1995  Jeff Law  (law@hurl)
+
+       * top.c (build_command_line): Demand arguments for if/while
+       commands.
+
 Mon Oct  2 13:08:01 1995  Jason Molenda   (crash@phydeaux.cygnus.com)
 
        * Makefile.in (X11_CFLAGS): Set only to @X_INCDIR@.
index 20c18651a4db7d980f79817377ca7141708b2ee9..1d6b0c51a45a79b4018560931d94af46c7f726a5 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -649,6 +649,9 @@ build_command_line (type, args)
 {
   struct command_line *cmd;
 
+  if (args == NULL)
+    error ("if/while commands require arguments.\n");
+
   cmd = (struct command_line *)xmalloc (sizeof (struct command_line));
   cmd->next = NULL;
   cmd->control_type = type;