diff options
| author | Larry Doolittle <ldoolitt@recycle.lbl.gov> | 2017-04-25 12:32:41 -0700 |
|---|---|---|
| committer | Larry Doolittle <ldoolitt@recycle.lbl.gov> | 2017-04-25 12:32:41 -0700 |
| commit | 37999a4fbf3487b363fd0c2f9b7ab622401b202a (patch) | |
| tree | 7301dc7732f5348de1d489346e8c63874ad757ac /libtcc.c | |
| parent | 7acf9aa86275a24b468786d6ea9f308ae33f011c (diff) | |
| download | tinycc-37999a4fbf3487b363fd0c2f9b7ab622401b202a.tar.gz tinycc-37999a4fbf3487b363fd0c2f9b7ab622401b202a.tar.bz2 | |
Simple-minded fix for bug #50847
bug #50847: #line directive corrupts #include search path
Keep a second copy of the filename, that isn't changed by the #line directive,
and use that on the initial search path for #include files.
Diffstat (limited to 'libtcc.c')
| -rw-r--r-- | libtcc.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -581,6 +581,7 @@ ST_FUNC void tcc_open_bf(TCCState *s1, const char *filename, int initlen) bf->buf_end = bf->buffer + initlen; bf->buf_end[0] = CH_EOB; /* put eob symbol */ pstrcpy(bf->filename, sizeof(bf->filename), filename); + pstrcpy(bf->filename2, sizeof(bf->filename2), filename); #ifdef _WIN32 normalize_slashes(bf->filename); #endif |
