From ab76b8d12cb4330602cbc225748a5d412bfe2d05 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 22 Apr 2017 12:26:51 +0200 Subject: [PATCH] inpcom.c, expand_section_ref(), cend != NULL => t != section_def --- src/frontend/inpcom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 924b90bda..c33d8db6a 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -2419,15 +2419,15 @@ expand_section_ref(struct line *c, char *dir_name) /* insert the library section definition into `c' */ { - struct line *cend = NULL, *newl; + struct line *cend = c, *newl; struct line *rest = c->li_next; struct line *t = section_def; for (; t; t=t->li_next) { newl = xx_new_line(NULL, copy(t->li_line), t->li_linenum, t->li_linenum_orig); - if (cend) + if (t != section_def) cend->li_next = newl; else { - c->li_next = newl; + cend->li_next = newl; newl->li_line[0] = '*'; newl->li_line[1] = '<'; }