ash: fix off-by-one in "jobs %4" handling. closes 7310
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
2ec34969e7
commit
07f7ea70ed
@ -3647,7 +3647,7 @@ getjob(const char *name, int getctl)
|
|||||||
|
|
||||||
if (is_number(p)) {
|
if (is_number(p)) {
|
||||||
num = atoi(p);
|
num = atoi(p);
|
||||||
if (num < njobs) {
|
if (num <= njobs) {
|
||||||
jp = jobtab + num - 1;
|
jp = jobtab + num - 1;
|
||||||
if (jp->used)
|
if (jp->used)
|
||||||
goto gotit;
|
goto gotit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user