diff options
author | Bruce Momjian | 1997-06-02 13:55:19 +0000 |
---|---|---|
committer | Bruce Momjian | 1997-06-02 13:55:19 +0000 |
commit | 290bef4e05c12ff568ff49dc07920d3677c0d4f9 (patch) | |
tree | 960acd2994771904e73c54f5441535ea485269d8 | |
parent | 5b5c83f9e750fc0ae22f09d7be35b98a80233754 (diff) |
Allow for EOF or \0 as input() return from lex.
-rw-r--r-- | src/lextest/scan.l | 5 |
1 files changed, 3 insertions, 2 deletions
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 <[email protected]> */ %% . { - while (input() != EOF) + int ch; + while ((ch = input()) != EOF && ch != '\0') ; } |