summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--src/jobs.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ba67b6e..7b67c0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 2014-09-26  Harald van Dijk <harald@gigawatt.nl>
 
 	* command: allow combining -p with -v.
+	* getjob: Fix off-by-one error for multiple of four job numbers
 
 2013-08-23  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/jobs.c b/src/jobs.c
index bf40204..c2c2332 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 <= njobs) {
 			jp = jobtab + num - 1;
 			if (jp->used)
 				goto gotit;