~sircmpwn/mrsh

4586ac0ff0e417f12bdda0f85192e8b21bb81c19 — Simon Ser 6 months ago 45a980b
shell/job: fix job_by_id segfault on empty list
1 files changed, 1 insertions(+), 0 deletions(-)

M shell/job.c
M shell/job.c => shell/job.c +1 -0
@@ 283,6 283,7 @@ struct mrsh_job *job_by_id(struct mrsh_state *state, const char *id) {
			}
			if (state->jobs.len < 1) {
				fprintf(stderr, "No current job\n");
				return NULL;
			}
			return state->jobs.data[state->jobs.len - 1];
		case '-':