summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/jobs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jobs.c b/src/jobs.c
index c2c2332..3997863 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -699,7 +699,7 @@ check:
 
 	if (is_number(p)) {
 		num = atoi(p);
-		if (num <= njobs) {
+		if (num > 0 && num <= njobs) {
 			jp = jobtab + num - 1;
 			if (jp->used)
 				goto gotit;