Improved error handling in case of faulty .lib line
This commit is contained in:
parent
0bd394dc7a
commit
8ecfc073a8
|
|
@ -3943,8 +3943,13 @@ static struct card *expand_section_ref(struct card *c, const char *dir_name)
|
||||||
s = skip_non_ws(line);
|
s = skip_non_ws(line);
|
||||||
while (isspace_c(*s))
|
while (isspace_c(*s))
|
||||||
s++;
|
s++;
|
||||||
if (isquote(*s))
|
if (isquote(*s)) {
|
||||||
for (s_e = ++s; *s_e && !isquote(*s_e); s_e++) ;
|
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
|
else
|
||||||
for (s_e = s; *s_e && !isspace_c(*s_e) && !isquote(*s_e); s_e++) ;
|
for (s_e = s; *s_e && !isspace_c(*s_e) && !isquote(*s_e); s_e++) ;
|
||||||
y = s_e;
|
y = s_e;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue