summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-19 06:44:02 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-19 06:44:02 (GMT)
commitf5e8e8fc2b662bb6095c878b18acbf333f70b867 (patch)
tree2b91e8f5b78cd6113c251b9520f145cf2ad4938f /Parser
parent6692f01c91b9ca0eafc4e8033bb2757b70f83fa4 (diff)
parent57bda335e1ec1e5dfa7972ad118f0a1e5f539ec6 (diff)
downloadcpython-f5e8e8fc2b662bb6095c878b18acbf333f70b867.zip
cpython-f5e8e8fc2b662bb6095c878b18acbf333f70b867.tar.gz
cpython-f5e8e8fc2b662bb6095c878b18acbf333f70b867.tar.bz2
merge 3.5 (#24022)
Diffstat (limited to 'Parser')
-rw-r--r--Parser/tokenizer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 8961884..8317293 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -1025,7 +1025,7 @@ tok_nextc(struct tok_state *tok)
else {
tok->done = E_OK;
tok->inp = strchr(tok->buf, '\0');
- done = tok->inp[-1] == '\n';
+ done = tok->inp == tok->buf || tok->inp[-1] == '\n';
}
}
else {