diff options
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index d0c0a510c..a31cee259 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3654,7 +3654,7 @@ getjob(const char *name, int getctl) | |||
3654 | 3654 | ||
3655 | if (is_number(p)) { | 3655 | if (is_number(p)) { |
3656 | num = atoi(p); | 3656 | num = atoi(p); |
3657 | if (num <= njobs) { | 3657 | if (num > 0 && num <= njobs) { |
3658 | jp = jobtab + num - 1; | 3658 | jp = jobtab + num - 1; |
3659 | if (jp->used) | 3659 | if (jp->used) |
3660 | goto gotit; | 3660 | goto gotit; |