diff options
author | 2020-10-19 14:53:11 +0000 | |
---|---|---|
committer | 2020-10-19 14:53:11 +0000 | |
commit | cf681e04a92ade0df3ccd77e25b3e8eda49bd52b (patch) | |
tree | c2344e1277229aa2347949679694886af37fa812 | |
parent | add retguard prologue/epilogue (diff) | |
download | wireguard-openbsd-cf681e04a92ade0df3ccd77e25b3e8eda49bd52b.tar.xz wireguard-openbsd-cf681e04a92ade0df3ccd77e25b3e8eda49bd52b.zip |
Do not "fall through" to the last "else" when we parsed the character.
rev 1.9 of lex.c broke the parser by deleting an outer "if" block
when only the inner was supposed to go.
OK tb
-rw-r--r-- | usr.bin/dig/lib/isc/lex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/dig/lib/isc/lex.c b/usr.bin/dig/lib/isc/lex.c index 5276af014a5..30a05fc21ba 100644 --- a/usr.bin/dig/lib/isc/lex.c +++ b/usr.bin/dig/lib/isc/lex.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lex.c,v 1.12 2020/09/14 08:40:44 florian Exp $ */ +/* $Id: lex.c,v 1.13 2020/10/19 14:53:11 florian Exp $ */ /*! \file */ @@ -415,8 +415,12 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { } tokenp->type = isc_tokentype_eof; done = 1; + } else if (c == ' ' || c == '\t') { + lex->last_was_eol = 0; } else if (c == '\n') { lex->last_was_eol = 1; + } else if (c == '\r') { + lex->last_was_eol = 0; } else if (c == '"' && (options & ISC_LEXOPT_QSTRING) != 0) { lex->last_was_eol = 0; |