Fix indent endless on garbage input (i.e., if it encountered EOF while

waiting for a '}' nesting terminator)

Obtained from:	OpenBSD rev 1.8
This commit is contained in:
David E. O'Brien 2001-02-27 20:50:34 +00:00
parent 7538a9a0f8
commit 52608c9fbf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=73175

View File

@ -997,7 +997,7 @@ main(argc, argv)
if (buf_ptr >= buf_end)
fill_buffer();
}
while (*buf_ptr != '\n' || in_comment) {
while (*buf_ptr != '\n' || (in_comment && !had_eof)) {
CHECK_SIZE_LAB;
*e_lab = *buf_ptr++;
if (buf_ptr >= buf_end)