summaryrefslogtreecommitdiff
path: root/conf/conf.c
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-09-11 16:55:41 +0200
committerJan Maria Matejka <mq@ucw.cz>2018-09-11 17:35:13 +0200
commitd50b0bc437f5ffd0d2c9f843217f8ed098c8d675 (patch)
treeececf183d0de0293c59b4db8b2cdaeb48a71085f /conf/conf.c
parent89b0af3978caf15e1478922a8d9d4f7e38145a61 (diff)
Conf: Show the line:char position where the syntax error happens
Diffstat (limited to 'conf/conf.c')
-rw-r--r--conf/conf.c1
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);