From 6dad93591d1274cf09c351140f7772f0d596dc73 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 13 Dec 1994 14:32:32 +0000 Subject: (sort_args): Make `options' a vector of ints. (sort_args): Don't overwrite the terminating null pointer. --- src/emacs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emacs.c') diff --git a/src/emacs.c b/src/emacs.c index 34554d157f..6172297bc3 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -968,7 +968,7 @@ sort_args (argc, argv) 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 @@ sort_args (argc, argv) 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", -- cgit v1.2.3