diff --git a/res/ael/ael.flex b/res/ael/ael.flex index 0674ba8ff1..4d441fb73b 100644 --- a/res/ael/ael.flex +++ b/res/ael/ael.flex @@ -887,7 +887,7 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, free(include_stack[include_stack_index].fname); include_stack[include_stack_index].fname = 0; } - include_stack[include_stack_index].fname = strdup(my_file); + include_stack[include_stack_index].fname = strdup(S_OR(my_file, "")); include_stack[include_stack_index].lineno = my_lineno; include_stack[include_stack_index].colno = my_col+yyleng; if (my_file) diff --git a/res/ael/ael.tab.c b/res/ael/ael.tab.c index cbe9d8c337..4d44d44f3a 100644 --- a/res/ael/ael.tab.c +++ b/res/ael/ael.tab.c @@ -3470,7 +3470,7 @@ struct pval *npval(pvaltype type, int first_line, int last_line, z->endline = last_line; z->startcol = first_column; z->endcol = last_column; - z->filename = strdup(my_file); + z->filename = strdup(S_OR(my_file, "")); return z; } diff --git a/res/ael/ael.y b/res/ael/ael.y index c8bc9c78eb..27e04c5834 100644 --- a/res/ael/ael.y +++ b/res/ael/ael.y @@ -854,7 +854,7 @@ struct pval *npval(pvaltype type, int first_line, int last_line, z->endline = last_line; z->startcol = first_column; z->endcol = last_column; - z->filename = strdup(my_file); + z->filename = strdup(S_OR(my_file, "")); return z; } diff --git a/res/ael/ael_lex.c b/res/ael/ael_lex.c index 6517644bde..02d8f82e49 100644 --- a/res/ael/ael_lex.c +++ b/res/ael/ael_lex.c @@ -3444,7 +3444,7 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, free(include_stack[include_stack_index].fname); include_stack[include_stack_index].fname = 0; } - include_stack[include_stack_index].fname = strdup(my_file); + include_stack[include_stack_index].fname = strdup(S_OR(my_file, "")); include_stack[include_stack_index].lineno = my_lineno; include_stack[include_stack_index].colno = my_col+yyleng; if (my_file)