diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-12-19 06:46:01 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-12-19 06:46:01 +0000 |
commit | 42ba543f18789c526c888607b74fee4309ccfcc3 (patch) | |
tree | bddc6c6c19d95c8a6bc2dabc6dce873d70d10d70 /Python/errors.c | |
parent | d2131b6bd33e17101ba57b4ace0b2c6e3e104b3e (diff) | |
parent | 94043dc6b155345f7e39a8658a17bed3b5d61d7d (diff) | |
download | cpython-42ba543f18789c526c888607b74fee4309ccfcc3.tar.gz |
Issue #25677: Merge SyntaxError caret positioning from 3.5
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/errors.c b/Python/errors.c index fd6c42fd27..6095843815 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -1144,11 +1144,8 @@ err_programtext(FILE *fp, int lineno) } fclose(fp); if (i == lineno) { - char *p = linebuf; PyObject *res; - while (*p == ' ' || *p == '\t' || *p == '\014') - p++; - res = PyUnicode_FromString(p); + res = PyUnicode_FromString(linebuf); if (res == NULL) PyErr_Clear(); return res; |