Check the # of arguments, instead of silently dumping core.
This commit is contained in:
parent
eae12ab7dc
commit
79c7b51574
@ -64,6 +64,8 @@ main(argc, argv)
|
||||
{
|
||||
int niceness = DEFNICE;
|
||||
|
||||
if (argc < 2)
|
||||
errx(1, "usage: nice [-number] command [arguments]");
|
||||
if (argv[1][0] == '-')
|
||||
if (argv[1][1] == '-' || isdigit(argv[1][1])) {
|
||||
niceness = atoi(argv[1] + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user