fix a bug, use ciprefix instaed of cieq, cieq led to

always FALSE if statement
This commit is contained in:
Holger Vogt 2020-04-13 10:24:03 +02:00
parent a7e664a5c2
commit 4c80a1ab7d
1 changed files with 5 additions and 2 deletions

View File

@ -1134,8 +1134,8 @@ struct inp_read_t inp_read( FILE *fp, int call_depth, const char *dir_name,
;
}
/* add Inp_Path to sourcepath variable */
if (cieq(buffer, "set") || cieq(buffer, "setcs")) {
/* add Inp_Path to buffer while keeping the sourcepath variable contents */
if (ciprefix("set", buffer)) {
char *p = strstr(buffer, "sourcepath");
if (p) {
p = strchr(buffer, ')');
@ -1149,6 +1149,9 @@ struct inp_read_t inp_read( FILE *fp, int call_depth, const char *dir_name,
for (s = buffer; *s && (*s != '\n'); s++)
;
}
else {
fprintf(stderr, "Warning: no closing parens found in 'set sourcepath' statement\n");
}
}
}