ccanlint: fix more potential segvs when reporting ccanlint errors.
[ccan] / tools / ccanlint / tests / info_summary_single_line.c
index b98ab74e729cfeeee0393550788b4168b78c64e9..4be98d43bf2f4d74bd36e908326f789ed517714b 100644 (file)
@@ -27,8 +27,8 @@ static void check_info_summary_single_line(struct manifest *m,
                        score->pass = false;
                        score->score = 0;
                        score_file_error(score, m->info_file, d->srcline+1,
-                                        m->info_file->lines[d->srcline]);
-                       score_file_error(score, m->info_file, d->srcline+2,
+                                        "%s\n%s",
+                                        m->info_file->lines[d->srcline],
                                         m->info_file->lines[d->srcline+1]);
                }
        }