Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c17d92

Browse files
methanemiss-islington
authored andcommitted
add missing break statement (GH-12147)
Bug introduced by 848037c.
1 parent 45d8d24 commit 8c17d92

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/_io/textio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,6 +2363,8 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
23632363
cookieObj = _PyObject_CallMethodId((PyObject *)self, &PyId_tell, NULL);
23642364
if (cookieObj == NULL)
23652365
goto fail;
2366+
break;
2367+
23662368
case SEEK_END:
23672369
/* seek relative to end of file */
23682370
cmp = PyObject_RichCompareBool(cookieObj, _PyLong_Zero, Py_EQ);
@@ -2401,8 +2403,10 @@ _io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence)
24012403
}
24022404
}
24032405
return res;
2406+
24042407
case SEEK_SET:
24052408
break;
2409+
24062410
default:
24072411
PyErr_Format(PyExc_ValueError,
24082412
"invalid whence (%d, should be %d, %d or %d)", whence,

0 commit comments

Comments
 (0)