]> granicus.if.org Git - sudo/commitdiff
only clear data structures on a parse error
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 27 Mar 1995 20:16:32 +0000 (20:16 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 27 Mar 1995 20:16:32 +0000 (20:16 +0000)
parse.yacc

index 1e349b42e82297fa5a2e82cd7cc34c545938d3e1..5854c760023b210d04144883877ab57b9cca4fcc 100644 (file)
@@ -113,8 +113,10 @@ char *s;
 yywrap()
 {
     /* reset values so we can reparse cleanly */
-    reset_aliases();
-    top = 0;
+    if (parse_error) {
+       reset_aliases();
+       top = 0;
+    }
 
     return(1);
 }