From 6278c9e7225e961601cb0a49c5136098e58930ec Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 5 Aug 2026 16:06:10 +0200 Subject: [PATCH] Improved error handling in case of faulty .lib line --- src/frontend/inpcom.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 854c1b287..0ec7189aa 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -3969,8 +3969,13 @@ static struct card *expand_section_ref(struct card *c, const char *dir_name) s = skip_non_ws(line); while (isspace_c(*s)) s++; - if (isquote(*s)) - for (s_e = ++s; *s_e && !isquote(*s_e); s_e++) ; + if (isquote(*s)) { + for (s_e = ++s; *s_e && !isquote(*s_e); s_e++); + if (!*s_e) { + fprintf(stderr, "\nError: Missing second quote in line \n %s", line); + controlled_exit(EXIT_FAILURE); + } + } else for (s_e = s; *s_e && !isspace_c(*s_e) && !isquote(*s_e); s_e++) ; y = s_e;