diff options
Diffstat (limited to 'extra/config/zconf.l')
-rw-r--r-- | extra/config/zconf.l | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/extra/config/zconf.l b/extra/config/zconf.l index cfa46077c..4cea5c85c 100644 --- a/extra/config/zconf.l +++ b/extra/config/zconf.l @@ -217,6 +217,11 @@ n [A-Za-z0-9_] append_string("\n", 1); } [^ \t\n].* { + while (yyleng) { + if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) + break; + yyleng--; + } append_string(yytext, yyleng); if (!first_ts) first_ts = last_ts; @@ -265,7 +270,7 @@ FILE *zconf_fopen(const char *name) FILE *f; f = fopen(name, "r"); - if (!f && name[0] != '/') { + if (!f && name != NULL && name[0] != '/') { env = getenv(SRCTREE); if (env) { sprintf(fullname, "%s/%s", env, name); |