# HG changeset patch # User Richard M. Stallman # Date 787329152 0 # Node ID d8fb9db90d8e304d93c6eaa4f9fa2c03c286bda2 # Parent c1704135914ff31a97bbfe515698c2ea166cdd0d (sort_args): Make `options' a vector of ints. (sort_args): Don't overwrite the terminating null pointer. diff -r c1704135914f -r d8fb9db90d8e src/emacs.c --- 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",