Shouldn't there be a test added for this? -- Eric. > On Sep 19, 2016, at 2:44 AM, benjamin.peterson <python-checkins at python.org> wrote: > > https://hg.python.org/cpython/rev/c6438a3df7a4 > changeset: 103950:c6438a3df7a4 > branch: 2.7 > parent: 103927:a8771f230c06 > user: Benjamin Peterson <benjamin at python.org> > date: Sun Sep 18 23:41:11 2016 -0700 > summary: > properly handle the single null-byte file (closes #24022) > > files: > Parser/tokenizer.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > > diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c > --- a/Parser/tokenizer.c > +++ b/Parser/tokenizer.c > @@ -951,7 +951,7 @@ > 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 { > > -- > Repository URL: https://hg.python.org/cpython > _______________________________________________ > Python-checkins mailing list > Python-checkins at python.org > https://mail.python.org/mailman/listinfo/python-checkins -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160919/264927ab/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4