V0.8: Copy file and line info during a macro expansion.
The file and line number information needs to be copied when doing a macro expansion. This prevents a macro that expands to an `ifdef of other construct that needs to push the stack from core dumping because the file is NULL.
This commit is contained in:
parent
f418bea775
commit
22ad8c42bc
|
|
@ -459,6 +459,8 @@ static void def_match()
|
|||
calloc(1, sizeof(struct include_stack_t));
|
||||
isp->str = cur->value;
|
||||
isp->next = istack;
|
||||
isp->path = strdup(istack->path);
|
||||
isp->lineno = istack->lineno;
|
||||
istack->yybs = YY_CURRENT_BUFFER;
|
||||
istack = isp;
|
||||
yy_switch_to_buffer(yy_create_buffer(istack->file, YY_BUF_SIZE));
|
||||
|
|
|
|||
Loading…
Reference in New Issue