changeset 10150:d8fb9db90d8e

(sort_args): Make `options' a vector of ints. (sort_args): Don't overwrite the terminating null pointer.
author Richard M. Stallman <rms@gnu.org>
date Tue, 13 Dec 1994 14:32:32 +0000
parents c1704135914f
children cb2401f4c61f
files src/emacs.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Tue Dec 13 13:44:20 1994 +0000
+++ b/src/emacs.c	Tue Dec 13 14:32:32 1994 +0000
@@ -968,7 +968,7 @@
      0 for an option that takes no arguments,
      1 for an option that takes one argument, etc.
      -1 for an ordinary non-option argument.  */
-  char *options = (char *) xmalloc (argc);
+  int *options = (int *) xmalloc (sizeof (int) * argc);
   int *priority = (int *) xmalloc (sizeof (int) * argc);
   int to = 1;
   int from;
@@ -1066,7 +1066,7 @@
 	argv[best + i + 1] = 0;
     }
 
-  bcopy (new, argv, sizeof (char *) * (argc + 1));
+  bcopy (new, argv, sizeof (char *) * argc);
 }
 
 DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P",