From 90b47ca285a6fa0b970e338afa723606cfe68c53 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 3 Jun 2022 11:03:24 -0400 Subject: Set line number on File lines --- bin/qf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/qf.c b/bin/qf.c index aac44fa5..ba20483d 100644 --- a/bin/qf.c +++ b/bin/qf.c @@ -68,6 +68,8 @@ static void parse(struct Line line) { push(line); return; } + char *rest; + line.nr = strtoul(line.text, &rest, 10); struct Line prev = {0}; if (lines.len) prev = lines.ptr[lines.len-1]; if (!prev.path || strcmp(line.path, prev.path)) { @@ -75,8 +77,6 @@ static void parse(struct Line line) { line.type = File; push(line); } - char *rest; - line.nr = strtoul(line.text, &rest, 10); if (rest > line.text && rest[0] == ':') { line.type = Match; line.text = &rest[1]; -- cgit 1.4.1