The crash that the check prevented has been fixed by commit
9e9e2b7.
if (j->state == JOB_RUNNING && counter++ == print_nr)
break;
if (j->state == JOB_RUNNING && counter++ == print_nr)
break;
+ /* m->n_running_jobs must be consistent with the contents of m->jobs,
+ * so the above loop must have succeeded in finding j. */
+ assert(counter == print_nr + 1);
cylon_pos = m->jobs_in_progress_iteration % 14;
if (cylon_pos >= 8)
cylon_pos = m->jobs_in_progress_iteration % 14;
if (cylon_pos >= 8)