fix loop on unterminated triple quotes

This commit is contained in:
Guido van Rossum 1995-01-17 16:12:13 +00:00
parent 62e376b164
commit 78c0535a22
1 changed files with 6 additions and 1 deletions

View File

@ -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 */