diff options
| author | jiang <30155751@qq.com> | 2014-05-28 21:51:50 +0800 |
|---|---|---|
| committer | jiang <30155751@qq.com> | 2014-05-28 21:51:50 +0800 |
| commit | 89134dd7b021389331d91e0552babf6de5108588 (patch) | |
| tree | 150cee0170eaf3cb13535b1d76c6ad1a5f1b4c05 | |
| parent | 698b16960a9978fd830a14983605ad8b6bc8945d (diff) | |
| download | tinycc-89134dd7b021389331d91e0552babf6de5108588.tar.gz tinycc-89134dd7b021389331d91e0552babf6de5108588.tar.bz2 | |
Considering the effect of CH_EOF on line_num
| -rw-r--r-- | libtcc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -581,7 +581,7 @@ static void error1(TCCState *s1, int is_warning, const char *fmt, va_list ap) strcat_printf(buf, sizeof(buf), "In file included from %s:%d:\n", (*pf)->filename, (*pf)->line_num); if (line_num > 0) { - if(tok == TOK_LINEFEED) + if(tok == TOK_LINEFEED || (tok == CH_EOF && line_num > 1)) line_num--; strcat_printf(buf, sizeof(buf), "%s:%d: ", f->filename, line_num); |
