diff options
author | Guido van Rossum <guido@python.org> | 1995-01-17 16:12:13 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-01-17 16:12:13 (GMT) |
commit | 78c0535a224697e1c7a1a4e68462d3d204e38942 (patch) | |
tree | 9514504bda566a8648f5526d38053311b2c17ecf | |
parent | 62e376b164f68ae22ae15610c7642dd920929e38 (diff) | |
download | cpython-78c0535a224697e1c7a1a4e68462d3d204e38942.zip cpython-78c0535a224697e1c7a1a4e68462d3d204e38942.tar.gz cpython-78c0535a224697e1c7a1a4e68462d3d204e38942.tar.bz2 |
fix loop on unterminated triple quotes
-rw-r--r-- | Parser/tokenizer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 75b63fb..083ef0e 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -257,7 +257,12 @@ tok_nextc(tok) } else { cur = tok->cur - tok->buf; - tok->done = E_OK; + if (feof(tok->fp)) { + tok->done = E_EOF; + done = 1; + } + else + tok->done = E_OK; } tok->lineno++; /* Read until '\n' or EOF */ |