Skip to content

Commit

Permalink
jcr: fix off-by-one error
Browse files Browse the repository at this point in the history
  • Loading branch information
sebsura committed Mar 26, 2024
1 parent 47a91dd commit c01c8e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/lib/jcr.cc
Expand Up @@ -862,8 +862,8 @@ int JobCount()
int count = 0;

LockJcrChain();
for (jcr = (JobControlRecord*)job_control_record_chain->first();
(jcr = (JobControlRecord*)job_control_record_chain->next(jcr));) {
for (jcr = (JobControlRecord*)job_control_record_chain->first(); jcr;
(jcr = (JobControlRecord*)job_control_record_chain->next(jcr))) {
if (jcr->JobId > 0) { count++; }
}
UnlockJcrChain();
Expand Down

0 comments on commit c01c8e9

Please sign in to comment.