From: Todd C. Miller Date: Tue, 9 Nov 1999 20:12:20 +0000 (+0000) Subject: Call yyrestart() on a parse error to reset the lexer state. X-Git-Tag: SUDO_1_6_0~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbc51dac5c2123bb121b25f6936369344d23745a;p=sudo Call yyrestart() on a parse error to reset the lexer state. --- diff --git a/visudo.c b/visudo.c index c8b664103..f644fee20 100644 --- a/visudo.c +++ b/visudo.c @@ -96,6 +96,7 @@ int addr_matches __P((char *)); int netgr_matches __P((char *, char *, char *)); int usergr_matches __P((char *, char *)); void init_parser __P((void)); +void yyrestart __P((FILE *)); /* * External globals exported by the parser @@ -299,6 +300,7 @@ main(argc, argv) case 'x' : Exit(0); break; } + yyrestart(yyin); /* reset lexer */ } } while (parse_error == TRUE);