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:
Denys Vlasenko 2014-09-08 17:21:52 +02:00
parent 2ec34969e7
commit 07f7ea70ed

View File

@ -3647,7 +3647,7 @@ getjob(const char *name, int getctl)
if (is_number(p)) {
num = atoi(p);
if (num < njobs) {
if (num <= njobs) {
jp = jobtab + num - 1;
if (jp->used)
goto gotit;