diff options
| author | Richard M. Stallman | 1994-12-13 14:32:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-13 14:32:32 +0000 |
| commit | 6dad93591d1274cf09c351140f7772f0d596dc73 (patch) | |
| tree | dcace03c15d6834c57543af2abbc951b00120e70 /src | |
| parent | fce47eeafe857956d2ec8fd6f92339723edbdfcb (diff) | |
| download | emacs-6dad93591d1274cf09c351140f7772f0d596dc73.tar.gz emacs-6dad93591d1274cf09c351140f7772f0d596dc73.zip | |
(sort_args): Make `options' a vector of ints.
(sort_args): Don't overwrite the terminating null pointer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c index 34554d157f5..6172297bc3e 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -968,7 +968,7 @@ sort_args (argc, argv) | |||
| 968 | 0 for an option that takes no arguments, | 968 | 0 for an option that takes no arguments, |
| 969 | 1 for an option that takes one argument, etc. | 969 | 1 for an option that takes one argument, etc. |
| 970 | -1 for an ordinary non-option argument. */ | 970 | -1 for an ordinary non-option argument. */ |
| 971 | char *options = (char *) xmalloc (argc); | 971 | int *options = (int *) xmalloc (sizeof (int) * argc); |
| 972 | int *priority = (int *) xmalloc (sizeof (int) * argc); | 972 | int *priority = (int *) xmalloc (sizeof (int) * argc); |
| 973 | int to = 1; | 973 | int to = 1; |
| 974 | int from; | 974 | int from; |
| @@ -1066,7 +1066,7 @@ sort_args (argc, argv) | |||
| 1066 | argv[best + i + 1] = 0; | 1066 | argv[best + i + 1] = 0; |
| 1067 | } | 1067 | } |
| 1068 | 1068 | ||
| 1069 | bcopy (new, argv, sizeof (char *) * (argc + 1)); | 1069 | bcopy (new, argv, sizeof (char *) * argc); |
| 1070 | } | 1070 | } |
| 1071 | 1071 | ||
| 1072 | DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", | 1072 | DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P", |