aboutsummaryrefslogtreecommitdiffstats
path: root/src/emacs.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1994-12-13 14:32:32 +0000
committerRichard M. Stallman <[email protected]>1994-12-13 14:32:32 +0000
commit6dad93591d1274cf09c351140f7772f0d596dc73 (patch)
treedcace03c15d6834c57543af2abbc951b00120e70 /src/emacs.c
parentfce47eeafe857956d2ec8fd6f92339723edbdfcb (diff)
(sort_args): Make `options' a vector of ints.
(sort_args): Don't overwrite the terminating null pointer.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c4
1 files changed, 2 insertions, 2 deletions
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",