diff options
author | Jan Maria Matejka <mq@ucw.cz> | 2018-09-11 16:55:41 +0200 |
---|---|---|
committer | Jan Maria Matejka <mq@ucw.cz> | 2018-09-11 17:35:13 +0200 |
commit | d50b0bc437f5ffd0d2c9f843217f8ed098c8d675 (patch) | |
tree | ececf183d0de0293c59b4db8b2cdaeb48a71085f /conf/conf.c | |
parent | 89b0af3978caf15e1478922a8d9d4f7e38145a61 (diff) |
Conf: Show the line:char position where the syntax error happens
Diffstat (limited to 'conf/conf.c')
-rw-r--r-- | conf/conf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/conf/conf.c b/conf/conf.c index 885e2e7e..8dbefe96 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -512,6 +512,7 @@ cf_error(const char *msg, ...) va_end(args); new_config->err_msg = cfg_strdup(buf); new_config->err_lino = ifs->lino; + new_config->err_chno = ifs->chno - ifs->toklen + 1; new_config->err_file_name = ifs->file_name; cf_lex_unwind(); longjmp(conf_jmpbuf, 1); |