mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
remove broken code accounting an offset the size of the line #10186
This commit is contained in:
parent
8451c4b6e0
commit
503d6c5ae9
3 changed files with 9 additions and 2 deletions
|
@ -1344,8 +1344,6 @@ print_error_text(PyObject *f, int offset, const char *text)
|
|||
{
|
||||
char *nl;
|
||||
if (offset >= 0) {
|
||||
if (offset > 0 && offset == (int)strlen(text))
|
||||
offset--;
|
||||
for (;;) {
|
||||
nl = strchr(text, '\n');
|
||||
if (nl == NULL || nl-text >= offset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue