Mercurial > emacs
diff src/emacs.c @ 14399:3a16ff5f6594
(sort_args): Error if option is missing an arg.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 28 Jan 1996 04:15:39 +0000 |
parents | 7acafb848e80 |
children | 002c4d6b3e28 |
line wrap: on
line diff
--- a/src/emacs.c Sun Jan 28 03:07:38 1996 +0000 +++ b/src/emacs.c Sun Jan 28 04:15:39 1996 +0000 @@ -1090,6 +1090,8 @@ { options[from] = standard_args[i].nargs; priority[from] = standard_args[i].priority; + if (from + standard_args[i].nargs >= argc) + fatal ("Option `%s' requires an argument\n", argv[from]); from += standard_args[i].nargs; goto done; } @@ -1126,6 +1128,8 @@ this option uses just one argv element. */ if (equals != 0) options[from] = 0; + if (from + options[from] >= argc) + fatal ("Option `%s' requires an argument\n", argv[from]); from += options[from]; } }