diff --git a/src/lextest/scan.l b/src/lextest/scan.l index 6f801376a33..5a20a5fa5f0 100644 --- a/src/lextest/scan.l +++ b/src/lextest/scan.l @@ -1,10 +1,11 @@ /* This should work, but non-patched flex 2.5.3 fails because input() - doesn't return EOF + doesn't return EOF or '\0' Bruce Momjian */ %% . { - while (input() != EOF) + int ch; + while ((ch = input()) != EOF && ch != '\0') ; }