Skip to content
Permalink
Browse files
__FILE__ should not update p->filename; fix #3485
  • Loading branch information
matz committed Mar 7, 2017
1 parent 513f4fb commit 63dbed00946afda34178a479cfa38fa78d620a00
Showing 1 changed file with 4 additions and 3 deletions.
@@ -2936,10 +2936,11 @@ var_ref : variable
}
| keyword__FILE__
{
if (!p->filename) {
p->filename = "(null)";
const char *fn = p->filename;
if (!fn) {
fn = "(null)";
}
$$ = new_str(p, p->filename, strlen(p->filename));
$$ = new_str(p, fn, strlen(fn));
}
| keyword__LINE__
{

0 comments on commit 63dbed0

Please sign in to comment.