summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c5
-rw-r--r--Python/pythonrun.c2
2 files changed, 2 insertions, 5 deletions
diff --git a/Python/errors.c b/Python/errors.c
index fd6c42f..6095843 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;
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index c881f90..8befa54 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -528,7 +528,7 @@ print_error_text(PyObject *f, int offset, PyObject *text_obj)
offset -= (int)(nl+1-text);
text = nl+1;
}
- while (*text == ' ' || *text == '\t') {
+ while (*text == ' ' || *text == '\t' || *text == '\f') {
text++;
offset--;
}