diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2004-02-17 10:41:24 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2004-02-17 10:41:24 +0000 |
commit | ce41b8785b65655dbe9b497b016dcf8741eb5aef (patch) | |
tree | 440ad566a86e7afcdff71f96131e93aa36773fb9 /Src | |
parent | a5cced9099f39d19fd55791a011bfe769c597a1a (diff) | |
download | zsh-ce41b8785b65655dbe9b497b016dcf8741eb5aef.tar.gz zsh-ce41b8785b65655dbe9b497b016dcf8741eb5aef.tar.xz zsh-ce41b8785b65655dbe9b497b016dcf8741eb5aef.zip |
19427: last job in jobs wasn't reported.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/jobs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index be44158c6..0188989df 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1488,14 +1488,14 @@ bin_fg(char *name, char **argv, Options ops, int func) int curmaxjob, ignorejob; if (unset(MONITOR) && oldmaxjob) { jobptr = oldjobtab; - curmaxjob = oldmaxjob; + curmaxjob = oldmaxjob ? oldmaxjob - 1 : 0; ignorejob = 0; } else { jobptr = jobtab; curmaxjob = maxjob; ignorejob = thisjob; } - for (job = 0; job != curmaxjob; job++, jobptr++) + for (job = 0; job <= curmaxjob; job++, jobptr++) if (job != ignorejob && jobptr->stat) { if ((!OPT_ISSET(ops,'r') && !OPT_ISSET(ops,'s')) || (OPT_ISSET(ops,'r') && OPT_ISSET(ops,'s')) || |