summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2014-01-18 01:41:29 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2014-01-18 01:41:29 +0000
commit699dbb016b51775f6e187afa451ef14d70f90475 (patch)
tree4c07935d128984dafd308373663f3dbd4e09e476
parente04406150d0aaf44dbf6d1cee9e0c591db53cc94 (diff)
If ugflag (indicating a character from the file being parsed has been
unget()'ed) is set, then properly set the lexchar position back one in get_token() so more error messages put the '^' in the proper spot.
-rw-r--r--sbin/dhclient/conflex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/conflex.c b/sbin/dhclient/conflex.c
index 9eedf051dd4..59888293d95 100644
--- a/sbin/dhclient/conflex.c
+++ b/sbin/dhclient/conflex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conflex.c,v 1.26 2013/12/18 00:37:59 krw Exp $ */
+/* $OpenBSD: conflex.c,v 1.27 2014/01/18 01:41:28 krw Exp $ */
/* Lexical scanner for dhclient config file. */
@@ -134,7 +134,7 @@ get_token(FILE *cfile)
do {
l = line;
- p = lpos;
+ p = lpos - ugflag;
c = get_char(cfile);