Commits

Anonymous committed 6060d7f

fix loop on unterminated triple quotes

Comments (0)

Files changed (1)

Parser/tokenizer.c

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