]> git.armaanb.net Git - opendoas.git/blobdiff - parse.y
after reading a too long line, restart at the beginning of the buffer so
[opendoas.git] / parse.y
diff --git a/parse.y b/parse.y
index 9ddca34e0a6431fef161d4856a8bdb7ebbc8dc94..c50378a5784c0001f2011a12eaa7cc9c101b6e25 100644 (file)
--- a/parse.y
+++ b/parse.y
@@ -311,8 +311,10 @@ repeat:
                        }
                }
                *p++ = c;
-               if (p == ebuf)
+               if (p == ebuf) {
                        yyerror("too long line");
+                       p = buf;
+               }
                escape = 0;
        }