mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
when we get a syntax error, report it for the previous line since
that's generally where the error occurred.
This commit is contained in:
@@ -147,9 +147,10 @@ void yyerror(s)
|
||||
{
|
||||
/* save the line the first error occured on */
|
||||
if (errorlineno == -1)
|
||||
errorlineno = sudolineno;
|
||||
errorlineno = sudolineno - 1;
|
||||
#ifndef TRACELEXER
|
||||
(void) fprintf(stderr, ">>> sudoers file: %s, line %d <<<\n", s, sudolineno);
|
||||
(void) fprintf(stderr, ">>> sudoers file: %s, line %d <<<\n", s,
|
||||
sudolineno - 1);
|
||||
#else
|
||||
(void) fprintf(stderr, "<*> ");
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user